i have read about the issue of getView called multiple times and all the answers. However, i don\'t find a solution for my problem.
I have a list where rows have two sta
Here is a very simple way of avoiding the double call when you know nothing below this block of code will distort the layout.
private static List usedPositions = new ArrayList();
...
@Override
public View getView(int position, View rowView, ViewGroup parent) {
rowView = inflater.inflate(R.layout.download_listview_item, null);
Log.d(LOG_TAG, "--> Position: " + position);
if (!usedPositions.contains(String.valueOf(position))){
usedPositions.add(String.valueOf(position));
return rowView;
}else{
usedPositions.remove(String.valueOf(position));
}
...