Comments (3)
The Issue is requesting basically the same as the issue #21 if I see that correctly. I don't think it's necessary to allow disabling / hiding the positive button, but to define if the current input is valid. If it is valid, alongside all the other inputs, the positive button will be displayed, or when not it won't be displayed.
fun isInputValid(inputText: String): Boolean {
return inputText.contains("//") // if true, positive button will be displayed, otherwise not.
}
Would this work how you imagine it? For custom bottom sheet implementations, the visibility of the buttons can be changed. But I think it would be easier if developers could just specify the validation logic & hint/ error messages if it's not valid.
Let me know your opinion!
from sheets.
This functionality to verify an input would be perfect, thank you!
from sheets.
With the coming version, check the sample setup - I added a password example with the InputSheet with custom validation logic. That's how it will look.
InputSheet().show(this) {
...
with(InputEditText {
...
endIconMode(TextInputLayout.END_ICON_PASSWORD_TOGGLE)
passwordVisible(false /* Don't display password in clear text. */)
validationListener { value ->
val valid = <Add custom validation logic>
if (valid) Validation.success()
else Validation.failed("Custom error text")
}
...
})
...
}
from sheets.
Related Issues (20)
- Color: TextView overlaps SeekBar HOT 2
- Localization: consider using platform resources HOT 1
- onNegative / onPositive support for dynamic drawables
- Text content on OptionSheet HOT 1
- Option constructor with long click listener without specifying sub-text. HOT 2
- Core module leaking colour attributes into consuming applications HOT 1
- make bottom sheet form scrollable HOT 1
- Option customisation support HOT 1
- Cannot use textview on bottomsheet HOT 3
- How to modify the size of the TextView of OptionSheet? HOT 1
- ColorSheet For Jetpack Compose. HOT 4
- CharSequence to the rescue
- Positive button should be invisible or unclickable.
- Custom year range in CalendarSheet HOT 1
- Text/Icons not centered when using OptionSheet as dialog HOT 1
- Upgrade to material 3. HOT 1
- Looping for option sheet HOT 1
- prevent dismiss
- Months Layout
- `rememberSheetState` and `rememberLauncherForActivityResult` not working together in the same page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sheets.