Skip to content
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

[TextInputLayout] endIconView and errorIconView has same id #1623

Closed
momvart opened this issue Aug 17, 2020 · 0 comments
Closed

[TextInputLayout] endIconView and errorIconView has same id #1623

momvart opened this issue Aug 17, 2020 · 0 comments
Assignees
Labels

Comments

@momvart
Copy link
Contributor

momvart commented Aug 17, 2020

Description: I wanted to do some customization on the end and start icon buttons of text input layout. I used ids text_input_start_icon and text_input_end_icon for finding those buttons. Everything was working well on the start icon but the end wasn't changing at all. After debugging and reading the source code for a while I found that errorIconView has the same id and all of my customizations are applied to that (because findViewById returns the first view it founds).

Expected behavior: errorIconView should have another distinct id for example text_input_error_icon.

Material Library version: 1.2.0

This can be easily solved by defining a new id and setting endIconView id after its inflation.

@momvart momvart added the bug label Aug 17, 2020
momvart added a commit to momvart/material-components-android that referenced this issue Aug 17, 2020
momvart added a commit to momvart/material-components-android that referenced this issue Aug 19, 2020
Rename id to have the same style as end icon id
Related issue: material-components#1623
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants