Composable Function

RemoteSplitRadioButton

The Wear Material RemoteSplitRadioButton offers two slots and shows the current selection state via a radio control.

RemoteSplitRadioButtonSample

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

    RemoteSplitRadioButton(
        selected = selected,
        onSelectionClick = valueChangeAction(selected, !selected),
        selectionContentDescription = "Split Radio".rs,
        onContainerClick = valueChangeAction(selected, !selected),
        modifier = modifier,
        label = { RemoteText("Split Radio".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: