write null bitmap to imageview to replace asyncdrawable

This commit is contained in:
Daniel Gultsch 2018-10-24 20:00:56 +02:00
parent d6f604a8e4
commit 18752a5c58
2 changed files with 4 additions and 4 deletions

View File

@ -743,7 +743,7 @@ public class FileBackend {
thumbnail = withGifOverlay; thumbnail = withGifOverlay;
} }
} }
this.mXmppConnectionService.getBitmapCache().put(uuid, thumbnail); cache.put(uuid, thumbnail);
} }
} }
return thumbnail; return thumbnail;

View File

@ -964,12 +964,12 @@ public abstract class XmppActivity extends ActionBarActivity {
} }
@Override @Override
protected void onPostExecute(Bitmap bitmap) { protected void onPostExecute(final Bitmap bitmap) {
if (bitmap != null && !isCancelled()) { if (!isCancelled()) {
final ImageView imageView = imageViewReference.get(); final ImageView imageView = imageViewReference.get();
if (imageView != null) { if (imageView != null) {
imageView.setImageBitmap(bitmap); imageView.setImageBitmap(bitmap);
imageView.setBackgroundColor(0x00000000); imageView.setBackgroundColor(bitmap == null ? 0xff333333 : 0x00000000);
} }
} }
} }