Assigning ID to a Row in an Android ListView

Posted by Chris on Stack Overflow See other posts from Stack Overflow or by Chris
Published on 2010-06-14T21:53:25Z Indexed on 2010/06/14 22:42 UTC
Read the original article Hit count: 265

Filed under:
|
|

I have a ListView. When an item on the ListView is tapped, it loads a SubView. I want to assign an ID to each row of the ListView, so I can pass that ID along to the SubView. How do I assign a specific ID to each row in the ListView?

Here is how I am currently loading the ListView:

setListAdapter(new ArrayAdapter<String>(this, R.layout.list_item, mArrayList));

© Stack Overflow or respective owner

Related posts about android

Related posts about listview