1

Android Listview Position is 0 on item selection

view story
linux-howto

http://stackoverflow.com – I have a custom adapter for my list view (extends ArrayAdapter). The list loads fine. However, when I click on an item in my list, i.e. the 5th item in the list, the position in getView is always 0 instead of 5. It crashes because convertView is no longer null If it is 0, the headervariable should be initialized to the R.id.listHeaderTv TextView, but it can't find it and ends up being null. How do I fix the position problem and convertView not being null anymore? EDIT: After checking onItemClick method, the position is correct. The only problem then is that after the onItemClick method, getVi (HowTos)