开发者

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

开发者 https://www.devze.com 2023-03-26 22:37 出处:网络
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 onItemCli开发者_开发百科ck. Now, i want

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 onItemCli开发者_开发百科ck. Now, i want to pass the values in these 4 column to 4 textviews(another layout). How can i do this? Thanks in advance.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号