I'm filling a custom ListView (by custom I mean with a specific layout) with a json request, an i'd like to implement an OnItemClickListener. So i did that :
ListView lv = (ListView) findViewById(R.id.MessageList);
lv.setOnItemClickListener(new android.widget.AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
}
});
My problem is that I want to exploit the selected item of the ListView, but I can only know which item has been selected (the first one, second one, etc), i'd like to associate my Database's ID (the primary key i got with json deserialize) with the ListView ID, or something like that.
Is there any way to do this ?
Best regards.