Hey guys,
I've got a class that creates a list from a DB using SimpleCursorAdapter. I want to add an onClick event to each item in the list but I don't know where to place the code.
Any help?
Hey guys,
I've got a class that creates a list from a DB using SimpleCursorAdapter. I want to add an onClick event to each item in the list but I don't know where to place the code.
Any help?
You would override the onListItemClick mehtod.
@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
Uri uri = ContentUris.withAppendedId(this.getIntent().getData(), id);
// your code
}