Closed Yabaze closed 3 years ago
in the same input bottom sheet, I'm not able to find the type of the input edit text. like password number. can you help me in terms of that?
You can pass the android.text.InputType
's to the InputEditText
(e.g. InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD
) , so you can request only numbers, passwords or allow long description text inputs and more. In the future, I might add more specific components to the InputSheet to make this easier.
Regarding your main issue, you want to have a possibility to define when an (text) input is valid? If it is not, you want to display your own hint/error message?
Yes. I want that only. I'm able to show my custom Message. But Bottom Sheet Got Dismissed that time.
You can pass the
android.text.InputType
's to theInputEditText
(e.g.InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD
) , so you can request only numbers, passwords or allow long description text inputs and more. In the future, I might add more specific components to the InputSheet to make this easier.
This one I tried already by your reference. But it is not working.
with(InputEditText { required() label("Old Password") hint("Enter Old Password") inputType(InputType.TYPE_TEXT_VARIATION_PASSWORD) })
this is my code. But It is not reflecting
Did you try InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD
- both together? (Not just one of it)
Ok, it won't work. For some reason the inputType value changes until it's used in the adapter. I'm revising the text input option, with better usage for passwords and with material design. I will also offer the option for custom validation logic for a component.
With the coming version, check the sample setup - I added a password example with the InputSheet with custom validation logic. (And how to use a password as an input.)
Is your feature request related to a problem? Please describe. I'm using input bottom sheet for change password functionality. If the user entered wrong details I'm able to validate and notify to the user. but Dialog automatically dismissing. again user has to enter the details again. so disable the dismiss will help me in ordered to rectify this problem.
Describe the solution you'd like remove the functionality of dismissing. and add those functionalities to the developer.