Why does Android's onItemClick want a long for row Id?
- by HenryAdamsJr
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.