aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-12-04 14:20:14 -0800
committerScott Jackson <daneren2005@gmail.com>2014-12-04 14:20:14 -0800
commit9a515619175fcfc90c9c7bf985fe4a75a055e1ac (patch)
tree7f69f5dbee34c1583d5de0c64bc49f5ac28c3fa7 /src
parentdfa1191d12ee7ace5ba89176c295af99f42f554a (diff)
downloaddsub-9a515619175fcfc90c9c7bf985fe4a75a055e1ac.tar.gz
dsub-9a515619175fcfc90c9c7bf985fe4a75a055e1ac.tar.bz2
dsub-9a515619175fcfc90c9c7bf985fe4a75a055e1ac.zip
Show blank image while loading new cover art
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/util/ImageLoader.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/github/daneren2005/dsub/util/ImageLoader.java b/src/github/daneren2005/dsub/util/ImageLoader.java
index 526c8106..0342b6c9 100644
--- a/src/github/daneren2005/dsub/util/ImageLoader.java
+++ b/src/github/daneren2005/dsub/util/ImageLoader.java
@@ -194,8 +194,7 @@ public class ImageLoader {
}
if (!large) {
- bitmap = getUnknownImage(entry, size);
- setImage(view, Util.createDrawableFromBitmap(context, bitmap), crossfade);
+ setImage(view, Util.createDrawableFromBitmap(context, null), false);
}
ImageTask task = new ViewImageTask(view.getContext(), entry, size, imageSizeLarge, large, view, crossfade);
task.execute();
@@ -217,8 +216,7 @@ public class ImageLoader {
return null;
}
- bitmap = getUnknownImage(entry, imageSizeLarge);
- setImage(remoteControl, Util.createDrawableFromBitmap(context, bitmap));
+ setImage(remoteControl, Util.createDrawableFromBitmap(context, null));
ImageTask task = new RemoteControlClientImageTask(context, entry, imageSizeLarge, imageSizeLarge, false, remoteControl);
task.execute();
return task;
@@ -289,7 +287,7 @@ public class ImageLoader {
private void setImage(RemoteControlClient remoteControl, Drawable drawable) {
if(remoteControl != null && drawable != null) {
Bitmap origBitmap = ((BitmapDrawable)drawable).getBitmap();
- if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
+ if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2 && origBitmap != null) {
origBitmap = origBitmap.copy(origBitmap.getConfig(), false);
}
if ( origBitmap != null && !origBitmap.isRecycled()) {