How do you set up an onClickListener for a list view so that each list view item takes you to a different intent?
Share
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.
Set the listener like this:
EDIT
You use the
positionthat you receive in the listener to get the item in the list at that position. Then you can bundle the item with theIntentand send it to theActivity(see code above withputExtra)