Your onListItemClick() should look like this..
@Override
public void onListItemClick(ListView list, View view, int position, long id){
Intent i = new Intent(meeting_list.this, ACTIVITY.class);
i.putExtra(ID_EXTRA, String.valueOf(id));
startActivity(i);
}
In the next activity just retrieve the ID.
Also put a log message to log the ID to insure it is being passed
Here to the passing activity retrieve it.
ID = getIntent().getStringExtra(ACTIVITY.ID_EXTRA);
//USe this to load the data with a cursor
public void load(){
Cursor c = helper.getByID(meetingId);
There should be a method in your database to getById(). Like this..
public Cursor getByID(String id){
String [] args={id};
return(getReadableDatabase().rawQuery("SELECT _id, meetingTitle, meetingDescrip, meetingAdress, meetingDateTime, lat, lon, type FROM meetings WHERE _ID=?", args));
Just substitute your return arg's for mine.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…