I have a Listview that has around 10 cells which all have a custom layout.
That’s why I have a itemVIewCount of 10 because I can’t recycle views as all cells are different.
The problem that I have is that getView is called for every position when I set the adapter of my listview, not only for the visible ones. Additionally I am not able to scroll in the listVIew, I only see the top 3 cells.
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView != null) {
//recycled view is unique, so it is correct
return convertView;
}
return preLoadedViews.get(position);
}
Silly question, misread the height of the ListView in the Hierarchyiew. This was indeed the problem, it was set incorrectly.