maxkeppeler / sheets

⭐ ‎‎‎‏‏‎ ‎Offers a range of beautiful sheets (dialogs & bottom sheets) for quick use in your project. Includes many ways to customize sheets.
https://maxkeppeler.github.io/sheets/
Apache License 2.0
921 stars 77 forks source link

InputSheet Password Validation #30

Closed irvine752 closed 3 years ago

irvine752 commented 3 years ago

Just a quick thing I noticed from the Sample App (1.1.2) Once the password validation gives an ok, any updates to the input are not allowed. I also think having an active cursor would be helpful.

maxkeppeler commented 3 years ago

Updates in form of validation state and message? What would the use case be, to still update this component, if the text is valid?

An active cursor to copy, move the position in the text etc.?

irvine752 commented 3 years ago

Not updates in the form of validation state & message. When I typed in an approved password, I just couldn't change it to something else (suppose the user changes their mind before the final confirmation of hitting ok). It seemed like any modifications were not allowed after the password validation (as in when the red message went away).

Active cursor just to see the positioning of the next letter to be inserted in the password. An active/blinking cursor would also indicate the focus is on a specific InputText box in Edit mode.

maxkeppeler commented 3 years ago

Hm. The red text is the specific error text of the TextInputLayout. Only if it's not valid, and the view is set into the error mode, the text is shown. I noticed I have to use the normal InputType for text, otherwise I can't delete characters anymore, but this behavior comes from the TextInputLayout itself.

maxkeppeler commented 3 years ago

@irvine752 did you try it with the normal text InputTye? (I suspect you used InputType for password?)

irvine752 commented 3 years ago

Not sure, I used the one provided in the sample app when I wrote the issue. I believe the issue is still there. I just installed the latest sample apk, and you can reproduce the issue using the call under "Password with custom validation". Just type in a long valid password, and it won't let you completely remove it.

maxkeppeler commented 3 years ago

The cursor commit shouldn't have influenced this behavior. I can't replicate it, I can still use backspace to delete characters, and write anything into it. I'm even using a Huawei P30 Pro, not Stock Android.

irvine752 commented 3 years ago

So this one is interesting. I ran the sample in the emulator and it works fine. Running this on my LG device running Android Pie, I can reproduce it though. It's also not stock android. You can probably keep this as a watch item if you want, not sure how to proceed.

maxkeppeler commented 3 years ago

I also can't find anything regarding this online. If you can, or someone else, knows something more about this in the future, I will try to fix it. I guess for now, I will close and watch this issue - and reopen it if more is known or reported.