In Android there seems to be 3 common ways of handling button clicks, how much difference is there between the methods? And are any of them \'better\' in some way?
T
The first two are the classic approaches. Which one you prefer is more of a general Java question than an Android question. The third one was added later to make things easier.
Setting up a click listener on a button is very common task, but it requires quite a bit of boilerplate code. One way to reduce the amount of boilerplate is to share a single click listener between several buttons. While this technique reduces the number of classes, it still requires a fair amount of code and it still requires giving each button an id in your XML layout file. With Android 1.6, none of this is necessary. All you have to do is declare a public method in your Activity to handle the click (the method must have one View argument)
Source