Android: How to create an onclick event for a SimpleCursorAdapter?
- by user117701
I have this code:
db=(new DatabaseHelper(this)).getWritableDatabase();
constantsCursor=db.rawQuery("SELECT _ID, title, subtitle, image "+
"FROM news ORDER BY title",
null);
ListAdapter adapter=new SimpleCursorAdapter(this,
R.layout.row, constantsCursor,
new String[] {"title", "subtitle", "image"},
new int[] {R.id.value, R.id.title, R.id.icon});
setListAdapter(adapter);
registerForContextMenu(getListView());
Which displays a list of titles. I dont however for the life of me know how to create a click event so that i can call another view when i click an item from that list.
Anyone?