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!
else if (isViewWasReused()) {
L.d(LOG_TASK_CANCELLED_IMAGEAWARE_REUSED, memoryCacheKey);
listener.onLoadingCancelled(imageUri, imageAware.getWrappedView());
}
read more about ViewHolder Pattern