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

input bottomsheets auto dismiss need to be disable #21

Closed
Yabaze opened this issue Dec 28, 2020 · 8 comments
Closed

input bottomsheets auto dismiss need to be disable #21

Yabaze opened this issue Dec 28, 2020 · 8 comments
Labels
enhancement New feature or request

Comments

@Yabaze
Copy link

Yabaze commented Dec 28, 2020

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.

@Yabaze Yabaze added the enhancement New feature or request label Dec 28, 2020
@Yabaze
Copy link
Author

Yabaze commented Dec 28, 2020

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?

@maxkeppeler
Copy link
Owner

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.

@maxkeppeler
Copy link
Owner

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?

@Yabaze
Copy link
Author

Yabaze commented Dec 28, 2020

Yes. I want that only. I'm able to show my custom Message. But Bottom Sheet Got Dismissed that time.

@Yabaze
Copy link
Author

Yabaze commented Dec 28, 2020

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.

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

@maxkeppeler
Copy link
Owner

Did you try InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD - both together? (Not just one of it)

@maxkeppeler
Copy link
Owner

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.

@maxkeppeler
Copy link
Owner

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants