在 Android compose 中是否有在 TextField 中居中文本?
TextField(
value = text,
onValueChange = setText,
maxLines = 2,
modifier = modifier
.clip(RoundedCornerShape(10.dp))
.background(Color(0xffe2ebf0))
.border(BorderStroke(5.dp, color = MaterialTheme.colors.secondary), shape = RoundedCornerShape(1.dp)),
textStyle = MaterialTheme.typography.h3,
keyboardOptions = KeyboardOptions.Default.copy(imeAction = ImeAction.Done),
keyboardActions = KeyboardActions(onDone = { submit() })
)