For listView, when you register OnItemClickListener, the method you specified looks like this:
public abstract void onItemClick (parent element of AdapterView, view view, int position, long id)
The identifier corresponds to the line that the user clicked on. My question is why is it long and not int? When will you use it for how long? I used it for int when I use it, so it seems to me that I'm wrong.
source
share