gpaligot
10/27/2021, 8:00 PMCheckbox or it is impossible? I tried to add a padding in the modifier of the composable but it doesn't work.Casey Brooks
10/27/2021, 8:06 PMModifier.clickable { } to a parent layout, rather than using the Checkbox's own onCheckedChange callback.Chris Fillmore
10/27/2021, 8:07 PMvar checked by remember { mutableStateOf(false) }
Box(
modifier = Modifier.clickable {
checked = !checked
}
) {
CheckBox(checked = checked, ...) ...
}Chris Fillmore
10/27/2021, 8:07 PMgpaligot
10/27/2021, 8:09 PMCasey Brooks
10/27/2021, 8:14 PM.clickable { } modifier rather than the opinionated onCheckedChanged) and build out the exact functionality you need without too much fuss.
The docs article on "Architectural Layering" goes into this a bit more in-depth https://developer.android.com/jetpack/compose/layeringCasey Brooks
10/27/2021, 8:18 PMModifier.toggleable or Modifier.triStateToggleable instead of .clickable for better accessibility 😉gpaligot
10/27/2021, 8:23 PM