I have a list item in my LazyRow that is rounded a...
# compose
I have a list item in my LazyRow that is rounded and clickable. The click goes outside of the bounds of the rounded background. The solution is "easy". Just apply a clip as well. This works great EXCEPT that my list item has a design element that is supposed to stick out the bounds of the list item. When I apply the clip to refine the click bounds ripple it also chops off this design asset. Is there a way to clip only the touch ripple?
hm. let me see if i can get this to work.
but how do you clip this ripple though?
@Colton Idle Does this work?
Copy code
    modifier = Modifier.clickable(
        interactionSource = remember{ MutableInteractionSource() },
        indication = rememberRipple()
    ) { /* handle onClick() */ }
let me give it a try
nope. didn't work.
Maybe I'm explaining my problem incorrectly. let me try to draw it.
Hmm, I guess you need to draw a custom
that matches the bounds of your rounded shape and use that indication in
, here is an example for how to do this: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]tion&ss=androidx%2Fplatform%2Fframeworks%2Fsupport:compose%2F. try it and see if it works
Woah. Very cool. Thanks for teaching @MR3Y