From c1bf285966f95a52cfa7843efb2b8e37b5b752c9 Mon Sep 17 00:00:00 2001 From: Raph Levien Date: Wed, 12 Nov 2014 12:41:24 -0800 Subject: [PATCH] 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 --- core/java/android/widget/TextView.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 0917b32e89d48..388ca2756076d 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -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) {