Member-only story
Android — How to use Weights in Jetpack Compose
Example Code — How to use Weights in Jetpack Compose
Sep 14, 2021
With 1.0.x
you can use the Modifier.weight
Something like:
Row() {
Column(
Modifier.weight(1f).background(Blue)){
Text(text = "Weight = 1", color = Color.White)
}
Column(
Modifier.weight(2f).background(Yellow)
) {
Text(text = "Weight = 2")
}
}