Skip to content

Commit 00a64e2

Browse files
committed
[TimePicker] Update error colors
PiperOrigin-RevId: 811396442
1 parent 2cbd7b0 commit 00a64e2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/java/com/google/android/material/timepicker/ChipTextInputComboView.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ private void applyErrorColors() {
221221
originalChipStrokeColor = textInputLayout.getBoxStrokeColor();
222222

223223
// TODO(b/394610420): tokens and ColorStateList with error state
224+
int colorError = MaterialColors.getColor(this, androidx.appcompat.R.attr.colorError);
224225
ColorStateList colorErrorContainer =
225226
MaterialColors.getColorStateListOrNull(getContext(), R.attr.colorErrorContainer);
226227
ColorStateList colorOnErrorContainer =
@@ -229,8 +230,8 @@ private void applyErrorColors() {
229230
chip.setChipBackgroundColor(colorErrorContainer);
230231
chip.setTextColor(colorOnErrorContainer);
231232
editText.setTextColor(colorOnErrorContainer);
232-
textInputLayout.setBoxStrokeColor(colorOnErrorContainer.getDefaultColor());
233-
label.setTextColor(colorOnErrorContainer);
233+
textInputLayout.setBoxStrokeColor(colorError);
234+
label.setTextColor(colorError);
234235
if (VERSION.SDK_INT >= VERSION_CODES.Q) {
235236
originalEditTextCursorColor = textInputLayout.getCursorColor();
236237
textInputLayout.setCursorColor(colorOnErrorContainer);

0 commit comments

Comments
 (0)