You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
BitmapDrawable: prevent garbage collection while in use
This commit is contained in:
@@ -36,7 +36,8 @@ public class BitmapDrawable extends Drawable {
|
||||
throws XmlPullParserException, IOException {
|
||||
final TypedArray a = r.obtainAttributes(attrs, R.styleable.BitmapDrawable);
|
||||
if (a.hasValue(R.styleable.BitmapDrawable_src)) {
|
||||
paintable = a.getDrawable(R.styleable.BitmapDrawable_src).paintable;
|
||||
bitmap = ((BitmapDrawable)a.getDrawable(R.styleable.BitmapDrawable_src)).bitmap;
|
||||
paintable = bitmap.getTexture();
|
||||
}
|
||||
a.recycle();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user