Is it possible to set singleLine or maxLines on TextField?
I've checked a source and it's missing. Any ideas / workarounds?
You can use the parameter maxLines
or singleLine
:
TextField(
//..
maxLines = 1)
or
TextField(
//..
singleLine = true)
Since Compose 1.0.0-alpha08, you can use singleLine
parameter to make the text field a single horizontally scrollable line:
TextField(
value = text,
onValueChange = { },
singleLine = true
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With