ziv kesten
05/04/2023, 3:18 PMColumn {
for (row in rows) {
Row {
Text(weight = 1) // align all the spacers to the length of the longest one
Spacer(width = 20)
Text()
}
}
}
But i am not sure how to go about aligning the spacers according to the longest first Text()
Doris Liu
05/04/2023, 9:19 PMval list = listOf("aaaaaaaaaaaaaaaaa", "b", "cccccccc", "ddd")
Column(Modifier.width(IntrinsicSize.Max)) {
for (row in 0..3) {
Row(Modifier.fillMaxWidth()) {
Text(list[row], Modifier.weight(1f))
Spacer(Modifier.width(20.dp))
Text("Some other text")
}
}
}