Id in onItemClick is not your Object Id
public abstract void onItemClick (AdapterView<?> parent, View view, int position, long id) in AdapterView
Last parameter calls id, but that will be row id, not the data object id in item.
You should use position and getItemAtPosition to get the data object in item you clicked. Then you can access id.
E.g.
Code
long noteId = ((Note)mListView.getItemAtPosition(position)).getId(); |
Trackback address for this post
Trackback URL (right click and copy shortcut/link location)
Feedback awaiting moderation
This post has 17 feedbacks awaiting moderation...
Form is loading...