I have a problem with using cursor adapter on gridview which I used the cursor to load photos from the media store. I realized my newView and bindView got called completely.
@Override
public View newView(Context context, Cursor cursor, ViewGroup parent) {
ImageView iView = new ImageView(context);
iView.setLayoutParams(new GridView.LayoutParams(200, 200));
taskA++;
Log.w("task s", taskA+ " count");
return iView;
}
note, i removed all the code that isn't supposed to be in newView (it should be in bindView) replace new GridView.LayoutParams(200, 200) with whatever height/width you need, don't use wrap content as your content is empty at the beginning, resulting in 0x0 pixels, so ALL of the ImageViews from your cursor fit into the GridView at once (thus newView and bindView get called for every view)