I'm thinking I might be missing something, is there a way to achieve "fill the rest of the space" in Compose Beta01 without the extra Box
element wrapping the spacer? Spacer
has no weight modifier, unfortunately.
Column(
modifier = Modifier
.height(120.dp)
.fillMaxWidth()
) {
Text(
text = "A"
)
Box(
modifier = Modifier
.weight(1f)
) {
Spacer(
Modifier
.fillMaxHeight()
)
}
Text(
text = "B"
)
}
Edit:
The extra box is not necessary at all, I was just misusing the modifier system. As a side note, the selected answer is probably another good way of achieving this.