Set ID item listview from database
I need to display a list of events in a listview, I want to do is that the ID of an item of listview is the ID that is registered in my DB. It is posible?
I would recommend you create a custom list adapter that takes in a custom object modeled around your database.
Do some research on BaseAdapter.
Once you've created your custom list adapter you can store all your database rows into something like
ArrayList<CustomObject> co = new ArrayList<CustomObject>();
Then when an OnClickListener is fired you can use the position like so:
int id = co.get(position).getId();
Assuming of course your CustomObject has a method called getId().