am 25f7c4b9: Merge "Update hint text color even when text present" into lmp-mr1-dev

* commit '25f7c4b99284cd1e118f50bd585e6534acfad7c4':
  Update hint text color even when text present
This commit is contained in:
Raph Levien
2014-11-14 20:56:40 +00:00
committed by Android Git Automerger

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();