Skip to content

Commit 631301e

Browse files
afohrmancketcham
authored andcommitted
Update outline box to take on the counter overflow color when overflowed.
PiperOrigin-RevId: 203775391
1 parent aedfc1c commit 631301e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/java/com/google/android/material/textfield/TextInputLayout.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,7 @@ void updateCounter(int length) {
11931193
}
11941194
if (editText != null && wasCounterOverflowed != counterOverflowed) {
11951195
updateLabelState(false);
1196+
updateTextInputBoxState();
11961197
updateEditTextBackground();
11971198
}
11981199
}
@@ -2009,6 +2010,8 @@ void updateTextInputBoxState() {
20092010
boxStrokeColor = disabledColor;
20102011
} else if (indicatorViewController.errorShouldBeShown()) {
20112012
boxStrokeColor = indicatorViewController.getErrorViewCurrentTextColor();
2013+
} else if (counterOverflowed && counterView != null) {
2014+
boxStrokeColor = counterView.getCurrentTextColor();
20122015
} else if (hasFocus) {
20132016
boxStrokeColor = focusedStrokeColor;
20142017
} else if (isHovered) {

0 commit comments

Comments
 (0)