Join Slack
Powered by
```android:digits="0,1,2,3,4,5,6,7,8,9,*,qwertzuio...
# compose
g
Gaurav Tyagi
07/08/2021, 12:54 PM
Copy code
android:digits="0,1,2,3,4,5,6,7,8,9,*,qwertzuiopasdfghjklyxcvbnm"
how can implement "android:digits" functionality with BasicTextField in compose
c
Colton Idle
07/09/2021, 3:53 AM
Arguably this sort of "filtering" of what input an input field can have should be handled outside of the composable in your ViewModel or something similar. Maybe some of the samples could help you? I see mentions of a text range.
https://cs.android.com/androidx/platform/tools/dokka-devsite-plugin/+/master:testDat[…]/samples/TextFieldSamples.kt;l=282?q=text%20compose%20samples
Open in Slack
Previous
Next