I want to create clickable sides in row with dynam...
# compose
i
I want to create clickable sides in row with dynamic size (square, fill parent height). I try to use code (from thread), but each
Box
fills size of root, not parent size.
Copy code
@Preview
@Composable
fun TestFill() {
    Row(
        modifier = Modifier
            .background(color = Color.Red)
            .wrapContentHeight()
            .wrapContentWidth()
            .defaultMinSize(144.dp, 48.dp),
        horizontalArrangement = Arrangement.SpaceBetween
    ) {
        //Box(modifier = Modifier.background(color = Color.White).fillMaxHeight().aspectRatio(1f))
        //Box(modifier = Modifier.background(color = Color.White).fillMaxHeight().aspectRatio(1f))
    }
}
On preview i would see three squares - white - box, red - row background, white - second box, but see full size screen filled with white color
a
What do you want the height of the squares to be? You are not restricting the max height of the parent, and you ask the box to take as much height as possible so it just did that.
i
Solved with
height(intristicSize)
on parent