Merge "Update hint text color even when text present" into lmp-mr1-dev

This commit is contained in:
Raph Levien
2014-11-14 20:53:11 +00:00
committed by Android (Google) Code Review

View File

@@ -3634,11 +3634,13 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
} }
if (mHintTextColor != null) { if (mHintTextColor != null) {
color = mHintTextColor.getColorForState(getDrawableState(), 0); color = mHintTextColor.getColorForState(getDrawableState(), 0);
if (color != mCurHintTextColor && mText.length() == 0) { if (color != mCurHintTextColor) {
mCurHintTextColor = color; mCurHintTextColor = color;
if (mText.length() == 0) {
inval = true; inval = true;
} }
} }
}
if (inval) { if (inval) {
// Text needs to be redrawn with the new color // Text needs to be redrawn with the new color
if (mEditor != null) mEditor.invalidateTextDisplayList(); if (mEditor != null) mEditor.invalidateTextDisplayList();