带有圆角的波纹JetpackCompose
在这个答案中,我弄错了波纹动画。您知道如何使用 Jetpack Compose 创建带有圆角的波纹吗?
使用默认波纹我有这个:
代码:
Card(shape = RoundedCornerShape(30.dp),
border = BorderStroke(width = 2.dp, color = buttonColor(LocalContext.current)),
backgroundColor = backColor(LocalContext.current),
modifier = Modifier
.fillMaxWidth()
.padding(10.dp)
.clickable(
interactionSource = remember { MutableInteractionSource() },
indication = rememberRipple(radius = 30.dp)
) { show = !show }
) { ... } //Show is animation of other element.
//如果我放波纹半径200 dp(它是卡片的高度)波纹效果不正常。