Merge pull request #272 from android/caren/fix_toggle_buttons

Fix toggle buttons interaction when using TalkBack
pull/302/head
Caren 2 years ago committed by GitHub
commit f16e9d011e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -72,7 +72,9 @@ fun NiaToggleButton(
onClick = { onCheckedChange(!checked) },
modifier = modifier
.size(size)
.toggleable(value = checked, enabled = enabled, role = Role.Button, onValueChange = {})
.toggleable(value = checked, enabled = enabled, role = Role.Button, onValueChange = {
onCheckedChange(!checked)
})
.drawBehind {
drawCircle(
color = if (checked) checkedBackgroundColor else backgroundColor,

Loading…
Cancel
Save