File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
lib/java/com/google/android/material/textfield Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1262,8 +1262,11 @@ public void setHintTextAppearance(@StyleRes int resId) {
12621262 * @attr ref com.google.android.material.R.styleable#TextInputLayout_hintTextColor
12631263 */
12641264 public void setHintTextColor (@ Nullable ColorStateList hintTextColor ) {
1265- if (collapsingTextHelper .getCollapsedTextColor () != hintTextColor ) {
1266- collapsingTextHelper .setCollapsedTextColor (hintTextColor );
1265+ if (focusedTextColor != hintTextColor ) {
1266+ if (defaultHintTextColor == null ) {
1267+ collapsingTextHelper .setCollapsedTextColor (hintTextColor );
1268+ }
1269+
12671270 focusedTextColor = hintTextColor ;
12681271
12691272 if (editText != null ) {
@@ -1279,7 +1282,7 @@ public void setHintTextColor(@Nullable ColorStateList hintTextColor) {
12791282 */
12801283 @ Nullable
12811284 public ColorStateList getHintTextColor () {
1282- return collapsingTextHelper . getCollapsedTextColor () ;
1285+ return focusedTextColor ;
12831286 }
12841287
12851288 /** Sets the text color used by the hint in both the collapsed and expanded states. */
You can’t perform that action at this time.
0 commit comments