How to update an already created Drawable with Bitmap without creating a new Drawable? Ie, approximately the case is approximately as follows:
// сначала создается и используется Drawable Drawable drawable = new MyDrawable(context.getResources(), bitmap); // Затем прилетает новый Bitmap, который необходимо загрузить в Drawable makeSomeAsyncOperation((newBitmap) -> drawable.setBitmap(newBitmap)); MyDrawable looks like this:
class MyDrawable extends BitmapDrawable { public void setBitmap(@NonNull Bitmap bitmap) { // ??? } } A bit specific implementation, but the other way is not suitable here.