onClick inside ListActivity using SimpleCursorAdapter
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 plac开发者_如何学Ce the code.
Any help?
You would override the onListItemClick
method.
@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
Uri uri = ContentUris.withAppendedId(this.getIntent().getData(), id);
// your code
}
精彩评论