Possible bug with ripples and animatedVisibility?
It's very slight but a ripple looks off when the container it's in open up because the ripple goes from filling in the rectangle, to instead be a circle. You can see that the left and right of the expanding item fills all the way to the corner, but the bottom left and right get a rounded ripple. In a large list of expanding and collapsing items my designer asked me if I could have the ripple continue to fill the entire container and thought it was a valid point. Curious if this is a valid bug worth reporting or working as intended. Code inside thread
@ExperimentalAnimationApi
@Composable
fun ExpandCollapseView2() {
var visible by remember { mutableStateOf(false) }
Column(modifier = Modifier.clickable { visible = !visible }.padding(48.dp)) {
Row() {
Text("Testing with animatedVisibility")
}
AnimatedVisibility(visible = visible) {
Column {
Text(
"Testing second line",
modifier = Modifier.padding(bottom = 24.dp),
)
}
}
}
}
l
Louis Pullen-Freilich [G]
03/17/2021, 8:56 PM
That looks a bit strange, yeah - probably worth filing a bug anyway, it should probably just expand to fill the new space fully
d
Doris Liu
03/17/2021, 9:01 PM
Yea, please file a bug. It seems like the ripple radius is only calculated once at the beginning of the animation. It's probably worth updating radius as the