I have two overlapping boxes. There's a blue box with an offset and low alpha transparency on top of a red box.
Box {
Box(Modifier
.size(200.dp)
.background(Color.Blue)
.clickable { Log.d("TAG", "I want to receive the clicks from the red box") }
) {}
Box(Modifier
.size(200.dp)
.offset(x = 20.dp)
.alpha(0.2F)
.background(Color.Red)
.clickable { Log.d("TAG", "I want my clicks to pass through to the blue box") }
) {}
}
How can the red box's clicks pass through to the blue box below?
(Real life scenario: I need this to happen during an animation, just as the box is fading out, and before it's moved elsewhere in the canvas, so the user can click on it just as it's nearly faded out, but click on the now visible composable underneath)