I'm setting a long click listener on a listview and I want to use the index of the clicked item to retrieve the corresponding object.
Method signature and parameter definition according to android docs
public abstract boolean onItemLongClick (AdapterView<?> parent, View view, int position, long id)
Parameters
parent The AbsListView where the click happened
view The view within the AbsListView that was clicked
position The position of the view in the list
id The row id of the item that was clicked
My question is will "position" and "id" always be the same? Those definitions seem interchangeable, so what's the difference?