diff options
author | Fabrice Di Meglio <fdimeglio@google.com> | 2012-09-28 19:50:18 -0700 |
---|---|---|
committer | Fabrice Di Meglio <fdimeglio@google.com> | 2012-09-30 11:00:02 -0700 |
commit | 47fb191841c50f45f39c5fcce3554e4990188583 (patch) | |
tree | d520348e462be00c628bacb73e63fae31bde2fa8 /core/java | |
parent | 343e11345ed496003f605e1b3bba5850d3e6cf0e (diff) | |
download | frameworks_base-47fb191841c50f45f39c5fcce3554e4990188583.zip frameworks_base-47fb191841c50f45f39c5fcce3554e4990188583.tar.gz frameworks_base-47fb191841c50f45f39c5fcce3554e4990188583.tar.bz2 |
Fix bug #7199562 UI mirroring for RTL locales (Arabic, Hebrew, Farsi): Play settings
- do not need those variables. Use what we already have in View.
- reset padding to initial values before changing it.
Change-Id: Ib396b3dca6e98a94d83a538a9b594b5eb426c453
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/view/View.java | 8 | ||||
-rw-r--r-- | core/java/android/widget/CheckedTextView.java | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index f8ebd61..dd9646d 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -14778,6 +14778,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback, /** * @hide */ + public void resetPaddingToInitialValues() { + mPaddingLeft = mUserPaddingLeftInitial; + mPaddingRight = mUserPaddingRightInitial; + } + + /** + * @hide + */ public Insets getOpticalInsets() { if (mLayoutInsets == null) { mLayoutInsets = (mBackground == null) ? Insets.NONE : mBackground.getLayoutInsets(); diff --git a/core/java/android/widget/CheckedTextView.java b/core/java/android/widget/CheckedTextView.java index 17c6f1d..d6fd4ff 100644 --- a/core/java/android/widget/CheckedTextView.java +++ b/core/java/android/widget/CheckedTextView.java @@ -46,9 +46,6 @@ public class CheckedTextView extends TextView implements Checkable { private int mCheckMarkWidth; private boolean mNeedRequestlayout; - private int initialPaddingLeft = -1; - private int initialPaddingRight = -1; - private static final int[] CHECKED_STATE_SET = { R.attr.state_checked }; @@ -179,8 +176,6 @@ public class CheckedTextView extends TextView implements Checkable { protected void internalSetPadding(int left, int top, int right, int bottom) { super.internalSetPadding(left, top, right, bottom); setBasePadding(isLayoutRtl()); - initialPaddingLeft = mPaddingLeft; - initialPaddingRight = mPaddingRight; } @Override @@ -190,6 +185,7 @@ public class CheckedTextView extends TextView implements Checkable { } private void updatePadding() { + resetPaddingToInitialValues(); int newPadding = (mCheckMarkDrawable != null) ? mCheckMarkWidth + mBasePadding : mBasePadding; mNeedRequestlayout |= (mPaddingRight != newPadding); |