i am having problemas trying to align text in a BasicTextField inside a ROW in Jetpack Compose, the goal is to have the text in total center.
The code is the following:
Row(verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.Center
) {
BasicTextField(
modifier = Modifier
.height(40.dp)
.align(Alignment.CenterVertically),
value = "Hello",
onValueChange = {},
singleLine = true,
textStyle = LocalTextStyle.current.copy(textAlign = TextAlign.Center),
)
}
Here is a picture of the result:
Any ideas what's wrong?
Thanks!
Ariel

