diff options
author | Gilles Debunne <debunne@google.com> | 2010-12-21 17:32:43 -0800 |
---|---|---|
committer | Gilles Debunne <debunne@google.com> | 2011-01-04 09:19:35 -0800 |
commit | b2316968cfb96148ebcff268afd32f98150a8869 (patch) | |
tree | c8981ce61c1f5d1bf8ff355945ee9607defa1085 /core/java | |
parent | c01f3feeb09b96f666c35fa1858ab3034599a452 (diff) | |
download | frameworks_base-b2316968cfb96148ebcff268afd32f98150a8869.zip frameworks_base-b2316968cfb96148ebcff268afd32f98150a8869.tar.gz frameworks_base-b2316968cfb96148ebcff268afd32f98150a8869.tar.bz2 |
Multi-line EditText background is set using a state.
Step 1/2: remove the previous code that relied on a specific theme attribute.
Bug 3214105
Change-Id: Ib4fc55a9093d64e69ac798ec56503ccdb284cbec
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/widget/TextView.java | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 32da572..d4515d5 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -310,8 +310,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener int mTextSelectHandleRes; int mTextEditPasteWindowLayout; int mTextEditNoPasteWindowLayout; - Drawable mEditTextMultilineBackground; - Drawable mEditTextSingleLineBackground; Drawable mSelectHandleLeft; Drawable mSelectHandleRight; @@ -765,10 +763,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener mTextEditNoPasteWindowLayout = a.getResourceId(attr, 0); break; - case com.android.internal.R.styleable.TextView_multilineBackground: - mEditTextMultilineBackground = a.getDrawable(attr); - break; - case com.android.internal.R.styleable.TextView_textIsSelectable: mTextIsSelectable = a.getBoolean(attr, false); break; @@ -776,7 +770,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } a.recycle(); - mEditTextSingleLineBackground = getBackground(); BufferType bufferType = BufferType.EDITABLE; final int variation = @@ -6385,7 +6378,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (applyTransformation) { setTransformationMethod(SingleLineTransformationMethod.getInstance()); } - setBackgroundDrawable(mEditTextSingleLineBackground); + // TODO setState } else { if (changeMaxLines) { setMaxLines(Integer.MAX_VALUE); @@ -6394,13 +6387,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (applyTransformation) { setTransformationMethod(null); } - // mEditTextMultilineBackground is defined and used only in EditText - if (mEditTextMultilineBackground != null) { - setBackgroundDrawable(mEditTextMultilineBackground); - } + // TODO setState } } - + /** * Causes words in the text that are longer than the view is wide * to be ellipsized instead of broken in the middle. You may also |