Loading graphics/java/android/graphics/drawable/DrawableContainer.java +8 −3 Original line number Diff line number Diff line Loading @@ -272,6 +272,8 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { boolean mCheckedConstantState; boolean mCanConstantState; boolean mPaddingChecked = false; DrawableContainerState(DrawableContainerState orig, DrawableContainer owner) { mOwner = owner; Loading Loading @@ -334,6 +336,7 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { mHaveStateful = false; mConstantPadding = null; mPaddingChecked = false; mComputedConstantSize = false; return pos; Loading @@ -359,22 +362,24 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { if (mVariablePadding) { return null; } if (mConstantPadding != null) { if (mConstantPadding != null || mPaddingChecked) { return mConstantPadding; } final Rect r = new Rect(0, 0, 0, 0); Rect r = null; final Rect t = new Rect(); final int N = getChildCount(); final Drawable[] drawables = mDrawables; for (int i = 0; i < N; i++) { if (drawables[i].getPadding(t)) { if (r == null) r = new Rect(0, 0, 0, 0); if (t.left > r.left) r.left = t.left; if (t.top > r.top) r.top = t.top; if (t.right > r.right) r.right = t.right; if (t.bottom > r.bottom) r.bottom = t.bottom; } } mPaddingChecked = true; return (mConstantPadding = r); } Loading Loading
graphics/java/android/graphics/drawable/DrawableContainer.java +8 −3 Original line number Diff line number Diff line Loading @@ -272,6 +272,8 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { boolean mCheckedConstantState; boolean mCanConstantState; boolean mPaddingChecked = false; DrawableContainerState(DrawableContainerState orig, DrawableContainer owner) { mOwner = owner; Loading Loading @@ -334,6 +336,7 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { mHaveStateful = false; mConstantPadding = null; mPaddingChecked = false; mComputedConstantSize = false; return pos; Loading @@ -359,22 +362,24 @@ public class DrawableContainer extends Drawable implements Drawable.Callback { if (mVariablePadding) { return null; } if (mConstantPadding != null) { if (mConstantPadding != null || mPaddingChecked) { return mConstantPadding; } final Rect r = new Rect(0, 0, 0, 0); Rect r = null; final Rect t = new Rect(); final int N = getChildCount(); final Drawable[] drawables = mDrawables; for (int i = 0; i < N; i++) { if (drawables[i].getPadding(t)) { if (r == null) r = new Rect(0, 0, 0, 0); if (t.left > r.left) r.left = t.left; if (t.top > r.top) r.top = t.top; if (t.right > r.right) r.right = t.right; if (t.bottom > r.bottom) r.bottom = t.bottom; } } mPaddingChecked = true; return (mConstantPadding = r); } Loading