Update hint text color even when text present

When text is present (so the hint doesn't show), updating the hint color
was suppressed. This patch updates the hint color in all cases, but
still skips the invalidate when the hint text is not showing.

Bug: 17454233
Change-Id: I3887908fb184a10f7a1d7e64f1d92b4955323227
This commit is contained in:
Raph Levien
2014-11-12 12:41:24 -08:00
parent 705c9c131a
commit c1bf285966

View File

@@ -3632,9 +3632,11 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
if (mHintTextColor != null) {
color = mHintTextColor.getColorForState(getDrawableState(), 0);
if (color != mCurHintTextColor && mText.length() == 0) {
if (color != mCurHintTextColor) {
mCurHintTextColor = color;
inval = true;
if (mText.length() == 0) {
inval = true;
}
}
}
if (inval) {