How can I link the array Buttons to intents so I can load up new classes – I’ve had alot of issues, guidance would be appreciated. Thank you
break;
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.
Do you mean to say that you have a bunch of
Buttonsand when the user clicks on them you want a new activity to start? This is done multiple ways, but my favorite is to have theActivityclass implementOnClickListener. If you’re working in Eclipse, it’ll prompt you to override theonClick(View v)method. In there you place code for starting your activities. Like this:Having a
switchstatement within youronClickmethod allows sorting of Button click events based on theidyou gave it when you defined it in your XML.If this was your question, I hope this helped! If not, comment to clarify your original question.