https://kotlinlang.org logo
#compose
Title
# compose
z

Zoltan Demant

01/26/2023, 9:59 AM
Is there a way to mimic the
Modifier.weight(1f)
behavior in a Row without the modifier?
Arrangement.SpaceEvenly
sounds right, but I just find that my first composable takes up 99% of the space, squishing the remaining elements.
1
c

Chris Fillmore

01/27/2023, 1:48 AM
How come you can’t use the modifier, exactly?
z

Zoltan Demant

01/27/2023, 6:41 AM
I have a rather large when block with ~20 small composables. Doing it without the modifier would mean that I don't need to specify it for every single one, and best of all: since they're local composables I wouldn't need the added boilerplate for each one to accept a modifier.
I could make a custom layout for this actually... Seems like a good use case for row/column though 💸
5 Views