@Override public void run() { listener.onLoadingCancelled(uri, imageView); } });
public void run() { if (isViewWasReused()) { if (loggingEnabled) L.i(LOG_TASK_CANCELLED, memoryCacheKey); listener.onLoadingCancelled(imageUri, imageView); } else { if (loggingEnabled) L.i(LOG_DISPLAY_IMAGE_IN_IMAGEVIEW, memoryCacheKey); Bitmap displayedBitmap = displayer.display(bitmap, imageView); listener.onLoadingComplete(imageUri, imageView, displayedBitmap); engine.cancelDisplayTaskFor(imageView); } }
listener.onLoadingStarted(uri, imageView); if (options.shouldShowImageForEmptyUri()) { imageView.setImageResource(options.getImageForEmptyUri()); imageView.setImageBitmap(null); listener.onLoadingComplete(uri, imageView, null); return; engine.prepareDisplayTaskFor(imageView, memoryCacheKey); listener.onLoadingStarted(uri, imageView); Bitmap bmp = configuration.memoryCache.get(memoryCacheKey); if (bmp != null && !bmp.isRecycled()) { } else { options.getDisplayer().display(bmp, imageView); listener.onLoadingComplete(uri, imageView, bmp);
@Override public void run() { if (options.shouldShowImageOnFail()) { imageView.setImageResource(options.getImageOnFail()); } listener.onLoadingFailed(uri, imageView, new FailReason(failType, failCause)); } });