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:
@@ -234,7 +234,7 @@ public class AnimationDrawable extends DrawableContainer implements Runnable, An
|
||||
/* public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs)
|
||||
throws XmlPullParserException, IOException {
|
||||
|
||||
TypedArray a = r.obtainAttributes(attrs,
|
||||
TypedArray a = obtainAttributes(r, theme, attrs,
|
||||
com.android.internal.R.styleable.AnimationDrawable);
|
||||
|
||||
super.inflateWithAttributes(r, parser, a,
|
||||
@@ -262,7 +262,7 @@ public class AnimationDrawable extends DrawableContainer implements Runnable, An
|
||||
continue;
|
||||
}
|
||||
|
||||
a = r.obtainAttributes(attrs, com.android.internal.R.styleable.AnimationDrawableItem);
|
||||
a = obtainAttributes(r, theme, attrs, com.android.internal.R.styleable.AnimationDrawableItem);
|
||||
int duration = a.getInt(
|
||||
com.android.internal.R.styleable.AnimationDrawableItem_duration, -1);
|
||||
if (duration < 0) {
|
||||
@@ -287,7 +287,7 @@ public class AnimationDrawable extends DrawableContainer implements Runnable, An
|
||||
+
|
||||
" defining a drawable");
|
||||
}
|
||||
dr = Drawable.createFromXmlInner(r, parser, attrs);
|
||||
dr = Drawable.createFromXmlInner(r, parser, attrs, theme);
|
||||
}
|
||||
|
||||
mAnimationState.addFrame(dr, duration);
|
||||
|
||||
Reference in New Issue
Block a user