Skip to content
🤔 Documentation issue? Report or edit

Row

A Row will show each child next to the previous children. It’s similar to a LinearLayout with a horizontal orientation.

@Composable
fun RowExample() {
    Row {
        Text("Hello World!")
        Text("Hello World!2")
    }
}

Content Arrangement

Horizontal

You can use horizontalArrangement to set the horizontal arrangement of the content in the Row

@Composable
fun RowExample() {
    Row(horizontalArrangement = Arrangement.SpaceEvenly) {
        Text("Hello World!")
        Text("Hello World!2")
    }
}

@Composable
fun RowExample() {
    Row(horizontalArrangement = Arrangement.Center) {
        Text("Hello World!")
        Text("Hello World!2")
    }
}

@Composable
fun RowExample() {
    Row(horizontalArrangement = Arrangement.End) {
        Text("Hello World!")
        Text("Hello World!2")
    }
}

See also:


Last update: July 27, 2022