am 29345d8d: am 9f64867d: Merge "Fix theme propagation to contained android:drawable elements" into lmp-dev

* commit '29345d8d21ebe2dfd39a09bda0205740a994de47':
  Fix theme propagation to contained android:drawable elements
This commit is contained in:
Alan Viverette
2014-10-02 23:23:01 +00:00
committed by Android Git Automerger
9 changed files with 14 additions and 10 deletions

View File

@@ -257,7 +257,7 @@ public class AnimatedRotateDrawable extends Drawable implements Drawable.Callbac
public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Theme theme) public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Theme theme)
throws XmlPullParserException, IOException { throws XmlPullParserException, IOException {
final TypedArray a = r.obtainAttributes(attrs, R.styleable.AnimatedRotateDrawable); final TypedArray a = obtainAttributes(r, theme, attrs, R.styleable.AnimatedRotateDrawable);
super.inflateWithAttributes(r, parser, a, R.styleable.AnimatedRotateDrawable_visible); super.inflateWithAttributes(r, parser, a, R.styleable.AnimatedRotateDrawable_visible);

View File

@@ -357,7 +357,8 @@ public class AnimatedStateListDrawable extends StateListDrawable {
public void inflate(@NonNull Resources r, @NonNull XmlPullParser parser, public void inflate(@NonNull Resources r, @NonNull XmlPullParser parser,
@NonNull AttributeSet attrs, @Nullable Theme theme) @NonNull AttributeSet attrs, @Nullable Theme theme)
throws XmlPullParserException, IOException { throws XmlPullParserException, IOException {
final TypedArray a = r.obtainAttributes(attrs, R.styleable.AnimatedStateListDrawable); final TypedArray a = obtainAttributes(
r, theme, attrs, R.styleable.AnimatedStateListDrawable);
super.inflateWithAttributes(r, parser, a, R.styleable.AnimatedStateListDrawable_visible); super.inflateWithAttributes(r, parser, a, R.styleable.AnimatedStateListDrawable_visible);

View File

@@ -272,7 +272,7 @@ public class AnimationDrawable extends DrawableContainer implements Runnable, An
public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Theme theme) public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Theme theme)
throws XmlPullParserException, IOException { throws XmlPullParserException, IOException {
TypedArray a = r.obtainAttributes(attrs, TypedArray a = obtainAttributes(r, theme, attrs,
com.android.internal.R.styleable.AnimationDrawable); com.android.internal.R.styleable.AnimationDrawable);
super.inflateWithAttributes(r, parser, a, super.inflateWithAttributes(r, parser, a,
@@ -300,7 +300,8 @@ public class AnimationDrawable extends DrawableContainer implements Runnable, An
continue; 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( int duration = a.getInt(
com.android.internal.R.styleable.AnimationDrawableItem_duration, -1); com.android.internal.R.styleable.AnimationDrawableItem_duration, -1);
if (duration < 0) { if (duration < 0) {

View File

@@ -81,7 +81,8 @@ public class ClipDrawable extends Drawable implements Drawable.Callback {
int type; int type;
TypedArray a = r.obtainAttributes(attrs, com.android.internal.R.styleable.ClipDrawable); TypedArray a = obtainAttributes(
r, theme, attrs, com.android.internal.R.styleable.ClipDrawable);
int orientation = a.getInt( int orientation = a.getInt(
com.android.internal.R.styleable.ClipDrawable_clipOrientation, com.android.internal.R.styleable.ClipDrawable_clipOrientation,

View File

@@ -84,7 +84,7 @@ public class InsetDrawable extends Drawable implements Drawable.Callback {
@Override @Override
public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Theme theme) public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Theme theme)
throws XmlPullParserException, IOException { throws XmlPullParserException, IOException {
final TypedArray a = r.obtainAttributes(attrs, R.styleable.InsetDrawable); final TypedArray a = obtainAttributes(r, theme, attrs, R.styleable.InsetDrawable);
super.inflateWithAttributes(r, parser, a, R.styleable.InsetDrawable_visible); super.inflateWithAttributes(r, parser, a, R.styleable.InsetDrawable_visible);
mInsetState.mDrawable = null; mInsetState.mDrawable = null;

View File

@@ -105,7 +105,7 @@ public class LevelListDrawable extends DrawableContainer {
continue; continue;
} }
TypedArray a = r.obtainAttributes(attrs, TypedArray a = obtainAttributes(r, theme, attrs,
com.android.internal.R.styleable.LevelListDrawableItem); com.android.internal.R.styleable.LevelListDrawableItem);
low = a.getInt( low = a.getInt(

View File

@@ -399,7 +399,7 @@ public class RotateDrawable extends Drawable implements Drawable.Callback {
@Override @Override
public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Theme theme) public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Theme theme)
throws XmlPullParserException, IOException { throws XmlPullParserException, IOException {
final TypedArray a = r.obtainAttributes(attrs, final TypedArray a = obtainAttributes(r, theme, attrs,
com.android.internal.R.styleable.RotateDrawable); com.android.internal.R.styleable.RotateDrawable);
super.inflateWithAttributes(r, parser, a, super.inflateWithAttributes(r, parser, a,

View File

@@ -93,7 +93,8 @@ public class ScaleDrawable extends Drawable implements Drawable.Callback {
int type; int type;
TypedArray a = r.obtainAttributes(attrs, com.android.internal.R.styleable.ScaleDrawable); TypedArray a = obtainAttributes(
r, theme, attrs, com.android.internal.R.styleable.ScaleDrawable);
float sw = getPercent(a, com.android.internal.R.styleable.ScaleDrawable_scaleWidth); float sw = getPercent(a, com.android.internal.R.styleable.ScaleDrawable_scaleWidth);
float sh = getPercent(a, com.android.internal.R.styleable.ScaleDrawable_scaleHeight); float sh = getPercent(a, com.android.internal.R.styleable.ScaleDrawable_scaleHeight);

View File

@@ -118,7 +118,7 @@ public class StateListDrawable extends DrawableContainer {
public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Theme theme) public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Theme theme)
throws XmlPullParserException, IOException { throws XmlPullParserException, IOException {
final TypedArray a = r.obtainAttributes(attrs, R.styleable.StateListDrawable); final TypedArray a = obtainAttributes(r, theme, attrs, R.styleable.StateListDrawable);
super.inflateWithAttributes(r, parser, a, super.inflateWithAttributes(r, parser, a,
R.styleable.StateListDrawable_visible); R.styleable.StateListDrawable_visible);