Background:
I’m filling gridview with imageviews using baseadapter. Imageview’s resources are downloaded using AsyncTask. I get a callback from onPostExecute method as success or failure. And I use this callback in adapter’s getView method.
Problem
If url for imageview returns 404 error, gridview has some empty spaces because of 404 error. I can remove those items and call notifydatasetchanged, but this time it refreshes all gridview from the start. Although i keep errored items in somewhere, remove them and call notifydatasetchanged once for all, it seems gridview is filled twice in application.
Question
I want to load images in gridview without any gaps. For instance if there are 9 images and forth and sixth images return 404 error, then i want to see only seven items in gridview
I hope my question is clear. Thanks for your help.
I solved my problem like this. When i catch a callback from 404 error, in baseadapter getview method,
and reloadFromPosition method is like that;