Android:如何为SimpleCrsorAdapter创建onclick事件?
我有以下代码:Android:如何为SimpleCrsorAdapter创建onclick事件?,android,Android,我有以下代码: db=(new DatabaseHelper(this)).getWritableDatabase(); constantsCursor=db.rawQuery("SELECT _ID, title, subtitle, image "+ "FROM news ORDER BY title",
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());
其中显示标题列表。然而,我一辈子都不知道如何创建一个单击事件,以便在单击列表中的某个项目时调用另一个视图
有人吗?如果要扩展ListActivity,则可以实现onListItemClick方法。请参阅:如果要扩展ListActivity,则可以实现onListItemClick方法。见: