开发者

How to create android onitemclick for layout change process?

i've created list in first layout from server, and now i want to go to next la开发者_高级运维yout when i choose the content in current layout it'll go through with that content using onlistitemclick? how can i use this?


If you already have data assigned to your list by some adapter, now you can set onItemClick listener for your List. The method you should use, is

public void onItemClick(AdapterView<?> list_view, View row_view, int position, long id) 

where you can obtain the position of selected item. The data stored in your list should be stored in some array and accessible using method .get(position). Then you can work with it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜