Zoltan Demant
08/12/2023, 1:01 PMRow
. I use Modifier.weight(percentage)
to acheive this and it works great, BUT - if the percentage is very small for one of the elements, its simply not rendered. I thought I could do Modifier.requiredSize(1.dp)
but that seems to only render one of the small elements. Im guessing that this is due to the layout not having enough space. How can I get this working?Zoltan Demant
08/12/2023, 1:03 PMModifier.weight(fraction.coerceAtLeast(0.01f))
but that falls apart on larger screens.Kirill Grouchnikov
08/12/2023, 3:47 PMZoltan Demant
08/12/2023, 7:03 PMZoltan Demant
08/13/2023, 5:53 AMStylianos Gakis
08/13/2023, 11:48 AMZoltan Demant
08/13/2023, 12:07 PMStylianos Gakis
08/13/2023, 12:09 PMZoltan Demant
08/13/2023, 12:18 PMreturn if (fraction > 0f) weight(fraction) else requiredWidth(1.dp)
Fraction for these endlessly small items were always >0f for me, hence .. the headache. Thanks for helping me discover this fist bumpStylianos Gakis
08/13/2023, 12:34 PMZoltan Demant
08/13/2023, 1:37 PM