diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-10-24 20:55:29 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-10-24 20:55:29 +0200 |
commit | 6cd9322130acab631fd1ee80cc264c5fa35939c6 (patch) | |
tree | 74d23ebfc37f7815b7c9abe90b3afeb6e3f0f914 /src/main/java/de | |
parent | 71720104f5ebcf2ff1d7d31bf8dee5e038175817 (diff) |
write null bitmap to imageview to replace asyncdrawable
Diffstat (limited to 'src/main/java/de')
-rw-r--r-- | src/main/java/de/pixart/messenger/persistance/FileBackend.java | 2 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/XmppActivity.java | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/persistance/FileBackend.java b/src/main/java/de/pixart/messenger/persistance/FileBackend.java index 765766b5f..092feabe2 100644 --- a/src/main/java/de/pixart/messenger/persistance/FileBackend.java +++ b/src/main/java/de/pixart/messenger/persistance/FileBackend.java @@ -551,7 +551,7 @@ public class FileBackend { thumbnail = withGifOverlay; } } - this.mXmppConnectionService.getBitmapCache().put(uuid, thumbnail); + cache.put(uuid, thumbnail); } } return thumbnail; diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java index 0a0f5da77..d3e1fce9f 100644 --- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java +++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java @@ -1176,12 +1176,12 @@ public abstract class XmppActivity extends ActionBarActivity { } @Override - protected void onPostExecute(Bitmap bitmap) { - if (bitmap != null && !isCancelled()) { + protected void onPostExecute(final Bitmap bitmap) { + if (!isCancelled()) { final ImageView imageView = imageViewReference.get(); if (imageView != null) { imageView.setImageBitmap(bitmap); - imageView.setBackgroundColor(0x00000000); + imageView.setBackgroundColor(bitmap == null ? 0xff333333 : 0x00000000); } } } |