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
Drawable: fix theme not getting passed to newly inflated drawables
When Theme support was added, not everything was immediately updated to use theme information properly. This was fixed in a lot of places since then, but it seems not here.
This commit is contained in:
@@ -40,10 +40,12 @@ public class BitmapDrawable extends Drawable {
|
||||
|
||||
public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Theme theme)
|
||||
throws XmlPullParserException, IOException {
|
||||
final TypedArray a = r.obtainAttributes(attrs, R.styleable.BitmapDrawable);
|
||||
final TypedArray a = obtainAttributes(r, theme, attrs, R.styleable.BitmapDrawable);
|
||||
if (a.hasValue(R.styleable.BitmapDrawable_src)) {
|
||||
try {
|
||||
bitmap = ((BitmapDrawable)a.getDrawable(R.styleable.BitmapDrawable_src)).bitmap;
|
||||
paintable = bitmap.getTexture();
|
||||
} catch (java.lang.Exception e) {e.printStackTrace();}
|
||||
}
|
||||
a.recycle();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user