Why does the inner column not fill the whole scree...
# compose
o
Why does the inner column not fill the whole screen? Code below results in whole screen being blue, but only a little bit red (height of the text). I would expect the inner column to fill the whole screen (and thus make the whole screen red).
Copy code
Column(modifier = Modifier.fillMaxHeight().background(Color.Blue)) {
    Column(modifier = Modififer.fillMaxHeight().background(Color.Red)) {
        Text("Hi")
    }
}
t
Maybe you want to use Box for the outer Column?
Inside a Column you should use weight(1f) to get the full height Of course it depends on how many items you have in a Column. Because a Column is a column 😄
o
@Timo Drick let's say the inner column has two text's above him (two siblings). Now I want the inner column to fill the remaining height. How would that happen?
t
just use the Modifier.weight(1f)
o
Thanks Timo it works. Guess it's still kind of a trap that Modifier.fillMaxHeight() exists for the column while it doesn't do anything
a
Modifier.fillMaxHeight()
in a
Column
definitely works. I copied your code and it's working as expected. You must have something else wrong.