summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaph Levien <raph@google.com>2012-11-02 15:08:43 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-11-02 15:08:43 -0700
commit369cf0c1a2c8985268b1f36fe50f9c886b706b28 (patch)
treed1dc8291a70b6d871120dd95d7f4a3290079bd60
parent3d96f9404e58b7edfe43cd4cb34c54d4a47545c5 (diff)
parentd9134e7aa1679878245b67ed1a318acb19d0c717 (diff)
downloadframeworks_base-369cf0c1a2c8985268b1f36fe50f9c886b706b28.zip
frameworks_base-369cf0c1a2c8985268b1f36fe50f9c886b706b28.tar.gz
frameworks_base-369cf0c1a2c8985268b1f36fe50f9c886b706b28.tar.bz2
am d9134e7a: Merge "Revert partial RTL\'ization of Editor.setError()" into jb-mr1-dev
* commit 'd9134e7aa1679878245b67ed1a318acb19d0c717': Revert partial RTL'ization of Editor.setError()
-rw-r--r--core/java/android/widget/Editor.java30
1 files changed, 6 insertions, 24 deletions
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index 495e46b..5397eb6 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -144,7 +144,6 @@ public class Editor {
CharSequence mError;
boolean mErrorWasChanged;
ErrorPopup mErrorPopup;
- private int mLastLayoutDirection = -1;
/**
* This flag is set if the TextView tries to display an error before it
@@ -290,29 +289,12 @@ public class Editor {
public void setError(CharSequence error, Drawable icon) {
mError = TextUtils.stringOrSpannedString(error);
mErrorWasChanged = true;
- final int layoutDirection = mTextView.getLayoutDirection();
- if (mLastLayoutDirection != layoutDirection) {
- final Drawables dr = mTextView.mDrawables;
- switch (layoutDirection) {
- default:
- case View.LAYOUT_DIRECTION_LTR:
- if (dr != null) {
- mTextView.setCompoundDrawables(dr.mDrawableLeft, dr.mDrawableTop, icon,
- dr.mDrawableBottom);
- } else {
- mTextView.setCompoundDrawables(null, null, icon, null);
- }
- break;
- case View.LAYOUT_DIRECTION_RTL:
- if (dr != null) {
- mTextView.setCompoundDrawables(icon, dr.mDrawableTop, dr.mDrawableRight,
- dr.mDrawableBottom);
- } else {
- mTextView.setCompoundDrawables(icon, null, null, null);
- }
- break;
- }
- mLastLayoutDirection = layoutDirection;
+ final Drawables dr = mTextView.mDrawables;
+ if (dr != null) {
+ mTextView.setCompoundDrawables(dr.mDrawableLeft, dr.mDrawableTop, icon,
+ dr.mDrawableBottom);
+ } else {
+ mTextView.setCompoundDrawables(null, null, icon, null);
}
if (mError == null) {
if (mErrorPopup != null) {