Christopher Mederos
02/26/2024, 6:03 AMFlowRow(modifier = Modifier.fillMaxWidth()) {
(1..5).forEach {
Box(
modifier = Modifier.fillMaxWidth(0.5f)
) {
Text("my content")
}
}
}
Alex Vanyo
02/26/2024, 4:39 PMFlowRow
.
I have a suspicion this is due to some rounding - could you debug by checking the resulting size of the FlowRow
and the size of each Box
?Uchenna Okoye
02/26/2024, 4:47 PMFlowRow(maxItemsInEachRow = 2, modifier = Modifier.fillMaxWidth()) {
(1..5).forEach {
Box(
modifier = Modifier.weight(1f)
) {
Text("my content")
}
}
}
Christopher Mederos
02/27/2024, 1:03 AMModifier.weight(1f)
instead has fixed the issue for me. It's a better approach otherwise too, so thanks for the advice again there 👍Uchenna Okoye
02/29/2024, 11:41 AM