Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Button button = (Button)findViewById(R.id.button);
- button.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- Toast.makeText(this, "Button clicked", Toast.LENGTH_LONG).show();
- }
- });
- Button button = (Button)findViewById(R.id.button);
- button.setOnClickListener(v -> Toast.makeText(this, "Button clicked", Toast.LENGTH_LONG).show());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement