https://kotlinlang.org logo
Title
z

Zoltan Demant

09/23/2021, 3:24 PM
If a
Column
contains two composables with varying height, how can I make sure the bottom one is always visible, despite the top one sometimes using
Modifier.fillMaxHeight
?
Id like for both the top & bottom composables to continue wrapping their content, hence using a box wouldnt work. Using Modifier.weight(1f) on the top one technically works, but then makes it expand to fill the entire available height as well, which is not what I want.
c

Csaba Szugyiczki

09/23/2021, 3:29 PM
how would it be possible to draw something below the top container if it has fillMaxHeight modifier?
z

Zoltan Demant

09/23/2021, 3:37 PM
Im not sure if its actually possible? Although Im seeing the same behavior if the top composable simply takes up all the space, regardless of fillMaxHeight. Id rather limit its size to fullHeight-bottomComposableHeight.
a

Albert Chang

09/23/2021, 3:38 PM
You can use
Modifier.weight(1f, fill = false)
.
✔️ 4
z

Zoltan Demant

09/23/2021, 3:42 PM
Amazing! Thank you 🌟