https://kotlinlang.org logo
s

Sri

04/12/2020, 4:37 PM
I was trying to create a row of buttons using the following code.
Copy code
@Composable
fun ButtonRow() {
    Row {
        val padding = Modifier.padding(12.dp)
        Button(onClick = {  }, modifier = padding) {
            Text(text = "Ok")
        }
        Button(onClick = {  }, modifier = padding) {
            Text(text = "Subtract")
        }
    }
}
I am not able to center the
Ok
text. Any help as to what I have to do to center it would be much appreciated.
a

Adam Powell

04/12/2020, 4:39 PM
It's a bug. Should be fixed next dev release.
👍 1