Hey everyone, I have a question about compose ripp...
# compose
Hey everyone, I have a question about compose ripples. I have a Radio button in a row, and when the row or button is selected, I want the ripple to show in the entire row. Currently I have that working, except when they click on the radio button itself, when they do that it shows the circular ripple around the radio button. I can disable that ripple with a dummy interaction source, but then I get no row ripple. How can I make it so when they click the radio button it ripples for the whole row?
Current code:
Copy code
                    selected = (text == selected),
                    onClick = { if(enabled) onSelection(text, index) }
                .padding(vertical = rowSpacing)
            ) {
                    selected = (text == selected),
                    enabled = enabled,
                    interactionSource = remember { DisabledInteractionSource() },
                    onClick = { onSelection(text, index) }
Figured it out, haha. If I set
in radio button to
, I can just handle the clicks on the row. I’ll leave this here incase someone needs it in the future.
👍 1
Oh yeah 🙂 There's also an explanation in https://developer.android.com/jetpack/compose/accessibility#common-cases but with
as an example
💯 1