Hristijan
01/25/2024, 10:03 AMCompositionLocalProvider(LocalRippleTheme provides NoRippleTheme) {
Switch(
checked = isSelected,
onCheckedChange = { onSwitchChange?.invoke(it) },
enabled = isPreferenceEnabled,
)
}
this was how I disabled the ripple
@Immutable
object NoRippleTheme : RippleTheme {
@Composable
override fun defaultColor(): Color = Color.Unspecified
@Composable
override fun rippleAlpha(): RippleAlpha = RippleAlpha(
draggedAlpha = 0f,
focusedAlpha = 0f,
hoveredAlpha = 0f,
pressedAlpha = 0f,
)
}
especially in the Switch m3 component
The migration guide mentions
private val DisabledRippleConfiguration =
RippleConfiguration(isEnabled = false)
but i can’t find it anywhereHristijan
01/25/2024, 10:08 AMandroidx.compose.material3:material3:1.3.0-alpha01
has not yet been released.