I´ve made quite many listeners and never really thought of it until now.
Basic Listview listener:
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Toast.makeText(getActivity(), "you clicked on: " + position + " id: " + id, Toast.LENGTH_SHORT).show();
}
});
According to documentary:
position is: The position of the view in the adapter.
id is: The row id of the item that was clicked.
Could someone good-hearted explain the difference for me.
Thx in advance..