我正在使用Jetpack Compose with materials 3.我的屏幕看起来像这样.我希望文本字段有一个透明的背景,而不是白色的背景.我试过下面的代码(见第background(..
行,但它不工作.我错过了什么?
TextField(
value = userNameValue.value,
onValueChange = { userNameValue.value = it },
modifier = Modifier
.fillMaxWidth()
.background(
Color.Transparent
),
label = {
Text(
"Names" //stringResource(id = R.string.username_label)
)
}
}