A few things:
You assign
convertView
tov
. Don't do that, there's no need, simply work withconvertView
directly.Use native
ArrayAdapter
'sgetItem(position)
instead. This will manage theList
you've passed yourArrayAdapter
and get items from it, so there's no need to use your own structured.Use
View.GONE
instead ofView.INVISIBLE
. This will make the layout disappear completely, instead of leaving the space it fits when it's visible.