aspose file tools*
The moose likes Android and the fly likes Accessing child TextView inside ListView Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Accessing child TextView inside ListView" Watch "Accessing child TextView inside ListView" New topic
Author

Accessing child TextView inside ListView

Astha Sharma
Ranch Hand

Joined: Oct 15, 2011
Posts: 245

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.


Astha - OCPJP 6 (90%)
Ameet Sagar
Greenhorn

Joined: Aug 17, 2012
Posts: 7

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.
 
Consider Paul's rocket mass heater.
 
subject: Accessing child TextView inside ListView
 
Similar Threads
getting null pointer
How to start new activity when click on a listview and pause the process that is being in background
Android CustomListView getView() getting nullpointerexception
android custom list view position and click event problem(list getting dynamic data from server)
how to use tamil fonts in android mobile