I want to replicate the effect used in the Settings app for Android 12, where the ripple effect is automatically triggered whenever an option is clicked (including the Switch itself). However, in my app, the ripple effect does not happen at all, only the Switch animates.
@Composable
fun ComposableSettingSimpleMode() {
val isChecked = remember { mutableStateOf(false) }
Row(modifier = Modifier
.fillMaxWidth()
.clickable(onClick = {})) {
Text(text = stringResource(id = R.string.simple_mode))
Switch(checked = isChecked.value, onCheckedChange = {
isChecked.value = it
})
}
}