https://kotlinlang.org logo
Title
j

James Black

04/13/2022, 6:28 PM
How do I get the text to be inline with the switch?
Row(horizontalArrangement = Arrangement.Center) {
    Switch(
        checked = checkedState.value[index],
        onCheckedChange = { ... }
    )
    Text(s.clothingLabel, style = MaterialTheme.typography.h6)
}
I am using compose 1.2.0-alpha07
k

Kirill Grouchnikov

04/13/2022, 6:33 PM
Try
verticalAlignment = Alignment.CenterVertically
👍 1
e

estevanfick

04/13/2022, 6:33 PM
What do you align the whole row vertically?
Row (
 horizontalArrangement = Arrangement.Center,
 verticalAlignment = Alignment.CenterVertically
) {
n

Norbi

04/13/2022, 6:34 PM
verticalAlignment?
j

James Black

04/13/2022, 7:06 PM
Thanks, I don't know why I was using horizontal alignment.