write null bitmap to imageview to replace asyncdrawable
This commit is contained in:
parent
d6f604a8e4
commit
18752a5c58
|
@ -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;
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue