Having a solid experience in non-Java and non-Android area, I\'m learning Android.
I have a lot of confusion with different areas, one of them is how to handle butt
To make things easier asp Question 2 stated, you can make use of lambda method like this to save variable memory and to avoid navigating up and down in your view class
//method 1
findViewById(R.id.buttonSend).setOnClickListener(v -> {
// handle click
});
but if you wish to apply click event to your button at once in a method.
you can make use of Question 3 by @D. Tran answer. But do not forget to implement your view class with View.OnClickListener.
In other to use Question #3 properly