下面是在 jetpack-compose 中 OutlinedTextField 代码的样子:
OutlinedTextField(
value = "",
onValueChange = {},
label = {Text("Input")}
)
Run Code Online (Sandbox Code Playgroud)
此 TextField 轮廓的默认颜色为紫色。我想明显地改变轮廓颜色和标签。
android android-theme android-textinputlayout material-ui android-jetpack-compose
如果是,TextField我们可以更改backgroundColor文本字段的,如下所示
TextField(
value = text.value,
onValueChange = { text.value = it },
colors = TextFieldDefaults.textFieldColors(backgroundColor = Color.Red)
)
Run Code Online (Sandbox Code Playgroud)
但是,国内并没有这样的事情BasicTextField