这是我的代码:
TextField(
value = text,
onValueChange = { onValueChanged(it) },
modifier = Modifier
.fillMaxWidth()
.height(100.dp)
.padding(10.dp)
.border(width = 1.dp, color = Color.Gray, shape = RoundedCornerShape(8.dp)),
singleLine = false,
placeholder = { Text("Enter some text here") }
)
它工作得很好,但我在边界区域之外得到了底线。怎么去掉这条线?
请尝试将背景颜色更改为透明或与您的背景相匹配的颜色。如果有帮助请告诉我
TextField(
value = text,
onValueChange = { onValueChanged(it) },
modifier = Modifier
.fillMaxWidth()
.height(100.dp)
.padding(10.dp)
.border(
width = 1.dp,
color = Color.Gray,
shape = RoundedCornerShape(8.dp)
)
.background(Color.Transparent), <- Set background color to transparent / Color. White
singleLine = false,
placeholder = { Text("Enter some text here") }
)