https://kotlinlang.org logo
#compose
Title
# compose
z

ziv kesten

11/22/2021, 9:25 AM
When setting ripple effect for a Row, i use rememberRipple but the ripple is not bounded to the rounded corners of the row. Is there anything off with the ripple implementation here?
Copy code
modifier = Modifier
    .padding(horizontal = 26.dp)
    .background(colorResource(R.color.lemonade_cloud), shape = RoundedCornerShape(7.dp))
    .fillMaxWidth()
    .wrapContentHeight()
    .clickable(onClick = {
        onLogoutClicked.invoke()
    }, indication = rememberRipple(bounded = true),
        interactionSource = remember { MutableInteractionSource() })
    .padding(vertical = 15.dp, horizontal = 20.dp),
z

Zhelyazko Atanasov

11/22/2021, 9:28 AM
I think that you are setting the rounded corners on the background only, not on the whole
Row
. Try using
.clip()
modifier and I think that you can remove the
shape
from your
background
modifier. https://foso.github.io/Jetpack-Compose-Playground/foundation/shape/
z

ziv kesten

11/22/2021, 9:29 AM
Thank you very much that did the trick!
12 Views