this must be somethng very simple I\'m overlooking, but I have the following problem (the post is rather lengthy, but I want to provide as much info as possible :) ).
I
Actually the problem here is that you set the content of the "convertView" within the if or else. Or you should always do that after instantiating the view if it is null and set the content only before returning the view.
Consequently, you're sure the content of the view is always the right one, updated using the position and not a false recycled view.
So your should generally speaking do the following:
(based on the tutorial from Android Guide here)
public View getView(int position, View convertView, ViewGroup parent) {
ImageView imageView;
if (convertView == null) {
imageView = new ImageView(mContext);
//just creating the view if not already present
} else {
imageView = (ImageView) convertView;
//re-using if already here
}
//here is the tricky part : set the content of the view out of the if, else
//just before returning the view
imageView.setImageResource(mThumbIds[position]);
return imageView;
}