OnClickListener
best practices?
What is best practice if you have an Activity
with, let's say 10 buttons, should you create the OnClickListener
for each View
(Button
) or is it better to create a single onClickListener
and just use a switch
with the view ID to determine the clicked View
?