user874747
user874747

Reputation:

Android : getting an item from a list (using onItemClick) and pass that Item data to another layout?

I've created list(containing name,mail,number,date) from server using listview extending by listactivity. And, i've also change the layout using list item by onItemClick. Now, i want to pass the values in these 4 column to 4 textviews(another layout). How can i do this? Thanks in advance.

Upvotes: 0

Views: 1565

Answers (1)

MrJre
MrJre

Reputation: 7161

you would want to get the underlying data object by using the position parameter from the onItemClick() in the getItem() method of the adapter that you are using for the list (getListAdapter()); Then you'd just call setText on each of your TextViews to set the data there.

Upvotes: 1

Related Questions