somerandomusername somerandomusername - 6 months ago 83
Android Question

Cancel loading image with universal-image-loader

I have GridView with remote image in every block. When I scroll it as fast as possible it lags the first time. After that it has loaded every image and works smoothly. How can I cancel loading image for blocks that went off screen ?


If You are Using ViewHolder Pattern, UIL Handles it by itself and you Don't need to Cancel Loading Images for blocks that went off screen!

see this Part of Source Code

else if (isViewWasReused()) {
        listener.onLoadingCancelled(imageUri, imageAware.getWrappedView());

read more about ViewHolder Pattern