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

samueldple

06/24/2020, 7:53 PM
I find that following the movement of
Toggleable
into a modifier, the bounds on the ripple applied are incorrect. I have the below code, but the ripple now extends to fill the full square bounds rather than the shape's bounds. How should this be rectified?
Copy code
Surface(
        shape = RoundedCornerShape(8.dp),
        modifier = Modifier.toggleable(
            value = selected,
            onValueChange = { ... }
        )
) {
    ...
}
Do I need to do my own
RippleIndication
for this effect?
r

romainguy

06/24/2020, 7:56 PM
I used a
Box
to handle the toggleable modifier
👍 2
s

samueldple

06/24/2020, 7:57 PM
Sounds reasonable, cheers 🙂
r

romainguy

06/24/2020, 7:57 PM
It’s what the Alt-Enter quickfix suggestion did for me :))
😅 1
s

samueldple

06/24/2020, 7:57 PM
Aha I should have thought to pay attention to that, eh 😆
3 Views