I am using a ListView containing images. These images are loaded from the Internet inside the adapter. Therefore I am using the UniversalImageDownloader.
<
I had the same issue with image downloading. I solved it by setting delayBeforeLoading(1000) in my DisplayImageOptions. It is needed to start downloading when user stop fling.
so try to replace your getDisplayOptions method with this
public static DisplayImageOptions getDisplayOptions() {
DisplayImageOptions options = new DisplayImageOptions.Builder()
.showImageForEmptyUri(R.drawable.error)
.showImageOnFail(R.drawable.error)
.delayBeforeLoading(1000)
.resetViewBeforeLoading(false) // default
.cacheInMemory(true) // default
.cacheOnDisc(true) // default
.build();
return options;
}
Documentation also recommends to use this code to avoid grid/list view scroll lags
boolean pauseOnScroll = false; // or true
boolean pauseOnFling = true; // or false
PauseOnScrollListener listener = new PauseOnScrollListener(imageLoader, pauseOnScroll, pauseOnFling);
listView.setOnScrollListener(listener);
You can read it here (the last item of "Useful Info" list)
So you can use one of this methods