am ddd02537: am b4426f15: Merge "Fix bug #8858012 layer-list\'s bitmap item\'s start/end gravity is incorrect on RTL under certain conditions" into jb-mr2-dev
* commit 'ddd02537a3fb499a82097453535194f4e29583dc': Fix bug #8858012 layer-list's bitmap item's start/end gravity is incorrect on RTL under certain conditions
This commit is contained in:
@@ -324,6 +324,7 @@ public class AnimatedRotateDrawable extends Drawable implements Drawable.Callbac
|
||||
mDrawable = source.mDrawable.getConstantState().newDrawable();
|
||||
}
|
||||
mDrawable.setCallback(owner);
|
||||
mDrawable.setLayoutDirection(source.mDrawable.getLayoutDirection());
|
||||
mPivotXRel = source.mPivotXRel;
|
||||
mPivotX = source.mPivotX;
|
||||
mPivotYRel = source.mPivotYRel;
|
||||
|
||||
@@ -268,6 +268,7 @@ public class ClipDrawable extends Drawable implements Drawable.Callback {
|
||||
mDrawable = orig.mDrawable.getConstantState().newDrawable();
|
||||
}
|
||||
mDrawable.setCallback(owner);
|
||||
mDrawable.setLayoutDirection(orig.mDrawable.getLayoutDirection());
|
||||
mOrientation = orig.mOrientation;
|
||||
mGravity = orig.mGravity;
|
||||
mCheckedConstantState = mCanConstantState = true;
|
||||
|
||||
@@ -329,6 +329,7 @@ public class DrawableContainer extends Drawable implements Drawable.Callback {
|
||||
d.setState(getState());
|
||||
d.setLevel(getLevel());
|
||||
d.setBounds(getBounds());
|
||||
d.setLayoutDirection(getLayoutDirection());
|
||||
}
|
||||
} else {
|
||||
mCurrDrawable = null;
|
||||
@@ -485,6 +486,7 @@ public class DrawableContainer extends Drawable implements Drawable.Callback {
|
||||
mDrawables[i] = origDr[i].getConstantState().newDrawable();
|
||||
}
|
||||
mDrawables[i].setCallback(owner);
|
||||
mDrawables[i].setLayoutDirection(origDr[i].getLayoutDirection());
|
||||
}
|
||||
|
||||
mCheckedConstantState = mCanConstantState = true;
|
||||
|
||||
@@ -281,6 +281,7 @@ public class InsetDrawable extends Drawable implements Drawable.Callback
|
||||
mDrawable = orig.mDrawable.getConstantState().newDrawable();
|
||||
}
|
||||
mDrawable.setCallback(owner);
|
||||
mDrawable.setLayoutDirection(orig.mDrawable.getLayoutDirection());
|
||||
mInsetLeft = orig.mInsetLeft;
|
||||
mInsetTop = orig.mInsetTop;
|
||||
mInsetRight = orig.mInsetRight;
|
||||
|
||||
@@ -600,12 +600,10 @@ public class LayerDrawable extends Drawable implements Drawable.Callback {
|
||||
/** @hide */
|
||||
@Override
|
||||
public void setLayoutDirection(int layoutDirection) {
|
||||
if (getLayoutDirection() != layoutDirection) {
|
||||
final ChildDrawable[] array = mLayerState.mChildren;
|
||||
final int N = mLayerState.mNum;
|
||||
for (int i = 0; i < N; i++) {
|
||||
array[i].mDrawable.setLayoutDirection(layoutDirection);
|
||||
}
|
||||
final ChildDrawable[] array = mLayerState.mChildren;
|
||||
final int N = mLayerState.mNum;
|
||||
for (int i = 0; i < N; i++) {
|
||||
array[i].mDrawable.setLayoutDirection(layoutDirection);
|
||||
}
|
||||
super.setLayoutDirection(layoutDirection);
|
||||
}
|
||||
@@ -652,6 +650,7 @@ public class LayerDrawable extends Drawable implements Drawable.Callback {
|
||||
r.mDrawable = or.mDrawable.getConstantState().newDrawable();
|
||||
}
|
||||
r.mDrawable.setCallback(owner);
|
||||
r.mDrawable.setLayoutDirection(or.mDrawable.getLayoutDirection());
|
||||
r.mInsetL = or.mInsetL;
|
||||
r.mInsetT = or.mInsetT;
|
||||
r.mInsetR = or.mInsetR;
|
||||
|
||||
@@ -321,6 +321,7 @@ public class RotateDrawable extends Drawable implements Drawable.Callback {
|
||||
mDrawable = source.mDrawable.getConstantState().newDrawable();
|
||||
}
|
||||
mDrawable.setCallback(owner);
|
||||
mDrawable.setLayoutDirection(source.mDrawable.getLayoutDirection());
|
||||
mPivotXRel = source.mPivotXRel;
|
||||
mPivotX = source.mPivotX;
|
||||
mPivotYRel = source.mPivotYRel;
|
||||
|
||||
@@ -281,6 +281,7 @@ public class ScaleDrawable extends Drawable implements Drawable.Callback {
|
||||
mDrawable = orig.mDrawable.getConstantState().newDrawable();
|
||||
}
|
||||
mDrawable.setCallback(owner);
|
||||
mDrawable.setLayoutDirection(orig.mDrawable.getLayoutDirection());
|
||||
mScaleWidth = orig.mScaleWidth;
|
||||
mScaleHeight = orig.mScaleHeight;
|
||||
mGravity = orig.mGravity;
|
||||
|
||||
Reference in New Issue
Block a user