-
Notifications
You must be signed in to change notification settings - Fork 50
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
Weird behavior when using inside TextInputLayout #17
Comments
Hello ramonsgds, Thanks for finding the bug and giving steps to reproduce it. |
I ran into the same problem. Hopefully you will fix it soon. Thanks! |
Hello, ramonsgds . Sorry for the late reply. Unfortunately, there is no way to devote much time to the project. Please feel free to Fork the project and add Pull requests. Thanks a lot! |
Reason of bug: mutability of TextWatchers list For TextInputLayout it means you should set mask only from code. |
as for me work-around are SET mask after focused view
|
When using it by itself, everything is perfect. When using the edit text inside a TextInputLayout, some weird behavior happens inside the "(..)". I've tested multiple arrangements for the mask and the numbers always get unordered when the edit text is inside a TextInputLayout.
It's impressive though, that after I delete all the text that was formatted wrong, and start over again, I get it perfect. It seems that a boolean might be interfering with that so that I always get the weird behavior when starting the activity. However, if I type and afterwards hit backspace until edit text is clear, and start typing again (the same visual configuration I would have in the beginning of activity) I now get it right. This might help discovering the bug (some boolean is set after I typed first two letters which is not being set at the beginning of activity lifecycle?)
I believe the best approach would be to try yourself and pretty much you'll get what I am describing. Here's my xml:
The text was updated successfully, but these errors were encountered: