Hi all,
I have an Activity that will have many different ImageButtons. I want the user to be able to select one as his choice (it's a sticker app), and continue to the next activity with this choice.
My question is, is there a way to implement only one onClick() method for all the buttons, and distinguish which button the user chose by an ID? for example, if the user selects button2, can I somehow pass the id of button2 to the onClick method in the activity?
The reason for doing this is to prevent repetitive code; the other way to do it is to implement an onClick() method for each sticker, which I think would turn out ugly.
Thanks!