I have 25 buttons in my Layout. What is the efficient way to know which button is clicked or to get their IDs ??
Thanks in advance..
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
i don’t get where is problem
in layout xml add onClick=”onClick” for every button then in Activity ad function
EDIT (coz i can’t add coment to someone else answer:
@Zach Rattner
According to this http://developer.android.com/reference/android/widget/Button.html Zach you’re wrong