I follow the official document to learn about Rows.
It's working fine. It arrange views horizontally and application runs without any issues.
Problem:
I want to set horizontalArrangement in Row. It didn't arrange it.
My code:
@Composable
fun SimpleRowArrangement(){
Row(horizontalArrangement = Arrangement.SpaceEvenly,
verticalAlignment = Alignment.Bottom) {
Text(text = "Row Text 1")
Text(text = "Row Text 2")
Text(text = "Row Text 3")
}
}
Output:

You should apply also the fillMaxWidth modifier.
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceEvenly,
verticalAlignment = Alignment.Bottom
) {
Text(text = "Row Text 1")
Text(text = "Row Text 2")
Text(text = "Row Text 3")
}

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With