For a listView, when you register an OnItemClickListener, the method you specify looks like this:
public abstract void onItemClick (AdapterView parent, View view, int position, long id)
The id corresponds to the row that the user clicked on. My question is simply why is it a long and not an int? When would you use it as a long? I’ve been casting it to an int when I use it, so it makes me think that maybe I’m using it wrong.
I think this comes to us straight from SQLite:
Given that, it seems natural that the Android APIs would specify 64 bits for the ID for a database row.