我有一个ListView
我的sqlite
数据,我想单击并在另一个中显示该值Activity
。
谁能教我如何做到这一点?
下面是我的代码:
Cursor cursor = mydb.queueAll();
startManagingCursor(cursor);
String[] from = new String[] { myDbAdapter.ELDERLY_DATE_TIME };
int[] to = new int[] { R.id.textView1 };
SimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(this,
R.layout.displayactivity, cursor, from, to);
listContent.setAdapter(cursorAdapter);
mydb.close();
listContent.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
// TODO Auto-generated method stub
}
});
提前致谢 :)