This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing child TextView inside ListView

 
Astha Sharma
Ranch Hand
Posts: 250
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I want to make an application which contain a ListView and children TextViews inside the list. On clicking different TextViews, application performs in different open different intents. But it is opening same intents on all the time. Following is the code-

Please tell me what mistake am I doing and help me out.
 
Ameet Sagar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

you are not using the ViewHolder class for holding the views.

Try creating the custom view holder class like


and add in get view method use following code


on line 23 you are using

Your should change it to


now you can use the pi object to create the intent and nevigate to another screen.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic