Jetpack撰写单行输入文本
问题描述:
是否可以在TextField上设置singleLine或maxLines?
Is it possible to set singleLine or maxLines on TextField?
我检查了一个来源,但它不见了.有任何想法/解决方法吗?
I've checked a source and it's missing. Any ideas / workarounds?
答
对于 1.0.0-beta06
,您可以使用参数 maxLines
或 singleLine 代码>:
With 1.0.0-beta06
you can use the parameter maxLines
or singleLine
:
TextField(
//..
maxLines = 1)
或
TextField(
//..
singleLine = true)