问题描述
在我的 TextField 中,默认情况下标签和下划线之间有很多差距。
这是它的样子:
如何缩小差距?
这是我的最顶层 TextField 的代码:
val query = remember { mutableStateOf("") }
TextField(
value = query.value,onValueChange = { newValue -> query.value = newValue },label = {
Text(
"Name as on PAN Card",color = colorResource(id = R.color.bright_green),fontSize = with(LocalDensity.current) {
dimensionResource(id = R.dimen._9ssp).toSp()
})
},textStyle = TextStyle(
textAlign = TextAlign.Start,fontFamily = FontFamily(Font(R.font.poppins_regular)),fontSize = with(LocalDensity.current) {
dimensionResource(id = R.dimen._16ssp).toSp()
},),modifier = Modifier
.constrainAs(name) {
top.linkTo(glName)
start.linkTo(parent.start)
end.linkTo(parent.end)
},colors = TextFieldDefaults.textFieldColors(
backgroundColor = Color.Transparent,unfocusedindicatorColor = colorResource(id = R.color.bright_green),focusedindicatorColor = colorResource(id = R.color.bright_green)
)
)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)