Is there any way I can remove click animation for ...
# compose
r
Is there any way I can remove click animation for Radio buttons / Checkboxes? Similar to this where indication is `null`:
Copy code
modifier = Modifier.clickable(
    interactionSource = remember { MutableInteractionSource() },
    indication = null,
    onClick = { }
)
m
have you tried using a CompositionLocalProvider(LocalRippleTheme provides TransparentRippleTheme){..}
might work. You have to create the TransparentRippleTheme
r
I haven’t tried this one, but will try. Thank You!
@myanmarking what should be included in this theme?
I tried to set colors as Color.Transparent, but don’t see any changes.
m
i dont know if it works. Its just a guess. Try this
Copy code
@Composable
private fun MyCallingComposable() {

    CompositionLocalProvider(
        LocalRippleTheme provides TransparentRippleTheme
    ) {
        CheckBox()
    }
}

@Composable
private fun CheckBox(modifier: Modifier = Modifier) {
}

@Immutable
private object TransparentRippleTheme : RippleTheme {

    @Composable
    override fun defaultColor() = Color.Transparent

    @Composable
    override fun rippleAlpha() = RippleAlpha(
        0f, 0f, 0f, 0f
    )
}
r
Doesn’t work for me sad panda