material-components-android icon indicating copy to clipboard operation
material-components-android copied to clipboard

[TextInputLayout] background color of the indicatorArea when error is displayed

Open gabrielemariotti opened this issue 5 years ago • 0 comments
trafficstars

Sometimes in the TextInputLayout the error text is not full visible. Instead of changing the errorTextColor could be useful an option to change the background color leaving the std errorTextColor. Example: Schermata 2020-08-06 alle 18 57 41

This change adds an option to tint the background color of the indicatorArea when an error is displayed.
The default background doesn't change the current behavior.

Schermata 2020-08-06 alle 18 57 57

Example:

  <com.google.android.material.textfield.TextInputLayout
      app:indicatorAreaBackgroundColorOnError="@color/indicator_area_backgroundcolor_selector"

or:

labelTextField.setIndicatorAreaBackgroundColorOnError(...);

It can close #1250

gabrielemariotti avatar Aug 06 '20 18:08 gabrielemariotti