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
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 @@
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 @@
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 @@
}
private void updatePadding() {
+ resetPaddingToInitialValues();
int newPadding = (mCheckMarkDrawable != null) ?
mCheckMarkWidth + mBasePadding : mBasePadding;
mNeedRequestlayout |= (mPaddingRight != newPadding);