I just came across this problem and the best way seems to use the ListView.getItemAtPosition(position)
instead of ListAdapter.getItem(position)
as the ListView
version accounts for the headers, ie:-
Do this instead:
myListView.getItemAtPosition(position)