Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gabrielemariotti
Copy link
Contributor

@gabrielemariotti gabrielemariotti commented Aug 6, 2020

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

Co-authored-by: Mattia Pagini <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TextInputLayout] Ability to set background color for helper texts
3 participants