Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,9 @@ public void loadImage(Drawable dummyDrawable, RemoteImageLoaderHandler handler)
if (imageCache != null && imageCache.containsKeyInMemory(imageUrl)) {
// do not go through message passing, handle directly instead
imageLoaderHandler.handleImageLoaded(imageCache.getBitmap(imageUrl), null);
} else {
executor.execute(new RemoteImageLoaderJob(imageUrl, imageLoaderHandler, imageCache,
numRetries, defaultBufferSize));
} else {
executor.execute(new RemoteImageLoaderJob(imageUrl, imageLoaderHandler, imageCache, numRetries, defaultBufferSize,
view));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ public RemoteImageLoaderHandler(ImageView imageView, String imageUrl, Drawable e
init(imageView, imageUrl, errorDrawable);
}

public RemoteImageLoaderHandler(RemoteImageLoaderImageViewAdapter remoteImageLoaderImageViewAdapter) {
this.imageView = remoteImageLoaderImageViewAdapter.getView();
setRemoteImageLoaderViewAdapter(remoteImageLoaderImageViewAdapter);
}

public RemoteImageLoaderHandler(Looper looper, ImageView imageView, String imageUrl,
Drawable errorDrawable) {
super(looper);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ public void run() {
}

if (bitmap == null) {
// If the view is reused do not download the bitmap
if (reusableView != null & !imageUrl.equals(reusableView.getTag())) {
return;
}
bitmap = downloadImage();
}

Expand Down