In the development for the control to add Listener is a very common work, the easiest way to add Listener can be: 1 findViewById (R.id.myButton). setOnClickListener (new View.OnClickListener () (public void onClick (View v) (/ / Do stuff))); Add a Listener using the above method has a drawback is that if control is too large, [...]
In the development for the control to add Listener is a very common work, the easiest way to add Listener can be: 1 findViewById (R.id.myButton). setOnClickListener (new View.OnClickListener () (public void onClick (View v) (/ / Do stuff))); Add a Listener using the above method has a drawback is that if control is too large, [...]