Composable Function

RemoteSplitCheckboxButton

The Wear Material RemoteSplitCheckboxButton offers two slots and shows the current toggle state via a checkbox.

RemoteSplitCheckboxButtonSample

@Sampled
@Composable
@WearPreviewDevices
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
fun RemoteSplitCheckboxButtonSample(modifier: RemoteModifier = RemoteModifier) {
    val checked = remember { MutableRemoteBoolean(true) }

    RemoteSplitCheckboxButton(
        checked = checked,
        onCheckedChange = valueChangeAction(checked, !checked),
        toggleContentDescription = "Split Checkbox".rs,
        onContainerClick = valueChangeAction(checked, !checked),
        modifier = modifier,
        label = { RemoteText("Split Checkbox".rs) },
    )
}
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: