I have a ListView
with my sqlite
data and i would like to click and display the value in another Activity
.
Can anyone teach me how to do this?
Below is my code:
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
}
});
Thanks in advance :)