From 6cd9322130acab631fd1ee80cc264c5fa35939c6 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Wed, 24 Oct 2018 20:55:29 +0200 Subject: write null bitmap to imageview to replace asyncdrawable --- src/main/java/de/pixart/messenger/persistance/FileBackend.java | 2 +- src/main/java/de/pixart/messenger/ui/XmppActivity.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java') 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); } } } -- cgit v1.2.3