I’m developing an Android application.
I have several objects loaded on a ListActivity. I want to know the item clicked on event onListItemClick.
I see method onListItemClick has a parameter called id. How can I setup this id?
My objects are identified by an ID, how can I add this ID to listItem?
Thanks.
What is the source of your list data? If you are using a cursor – then the id passed in
onListItemClick(ListView l, View v, int position, long id)will automatically be the id of the cursor row.