[TextInputLayout] Hiding already hidden error causes helper text to be hidden
See original GitHub issueDescription: Calling TextInputLayout.setError(null)
without checking TextInputLayout.getError()
for null will cause the helper text to show only for a brief amount of time (< 1s) before disappearing again.
Expected behavior: Calling TextInputLayout.setError(null)
consecutively is expected to only hide the error only and not the helper text as well.
Source code:
final TextInputLayout inputLayout = findViewById(R.id.input_email);
inputLayout.setHelperText("Email");
inputLayout.setError("Email required");
inputLayout.setError(null);
inputLayout.setError(null);
Android API version: 28
Material Library version: 1.1.0-alpha09
Device: Asus Zenfone Max Pro (M1)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:9 (3 by maintainers)
Top Results From Across the Web
android - Hide text input layout's error after editing the field's text
I'm trying to hide error on a ...
Read more >TextInputLayout not removing error view [37049145]
When calling TextInputLayout#setError(CharSequence) with a null CharSequence the ... We don't want to force a visual re-layout due to an error being hidden....
Read more >Android TextInputLayout Example | DigitalOcean
To display the error text, we'll have to call the method setError(String) on an instance of TextInputLayout in our MainActivity. java class as ......
Read more >A toolbar is already hidden on this side of your screen. You ...
I get this error in Windows 10 every time I turn off or on the TV, I it have connected to my laptop...
Read more >TextInputLayout Styling - Medium
xml should be used to customize labels, helpers and errors in TextInputLayout. The parent of the text appearance style should be TextAppearance.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have the same issue. Seems lake a bug to me. As for me – should be reopened. I expect that currently displayed helper text is not affected by setting error to null in any way. Simply do nothing Don’t even animate. It’s not ok that the result of setting error to null is hiding currently displayed helper text. Material Library version: 1.1.0-beta01
Having this problem too, don’t know how to solve it… Didn’t get this part “textInputLayoutPassword.helperText = resources.getText(R.string.login_error_lower_length_password)”