Composable Function

RemoteSplitRadioButton

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

RemoteSplitRadioButton

Source set: Android
@Composable
public fun RemoteSplitRadioButton(
    selected: RemoteBoolean,
    onSelectionClick: RemoteAction,
    selectionContentDescription: RemoteString?,
    onContainerClick: RemoteAction,
    modifier: RemoteModifier = RemoteModifier,
    enabled: RemoteBoolean = true.rb,
    shape: RemoteShape = RemoteSplitRadioButtonDefaults.shape,
    colors: RemoteSplitRadioButtonColors = RemoteSplitRadioButtonDefaults.splitRadioButtonColors(),
    contentPadding: RemotePaddingValues = RemoteSplitRadioButtonDefaults.ContentPadding,
    secondaryLabel: @Composable @RemoteComposable (RemoteRowScope.() -> Unit)? = null,
    label: @Composable @RemoteComposable RemoteRowScope.() -> Unit,
)

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

The RemoteSplitRadioButton is essentially a RemoteRow with two split areas. The first area containing label and optional secondaryLabel is clickable and triggers onContainerClick. The second area contains a radio selection control and triggers onSelectionClick.

For accessibility, provide a localized selectionContentDescription describing what the radio selection control represents when its meaning is not already clear from surrounding context, or pass null if no extra description is needed beyond its role and selected state.

Example of a RemoteSplitRadioButton with separate container and radio selection actions:

Parameters

selected RemoteBoolean flag indicating whether this button is currently selected.
onSelectionClick RemoteAction to be invoked when the selection control is clicked.
selectionContentDescription Text used by accessibility services to describe what this selection control represents, or null if no separate accessibility description is needed.
onContainerClick RemoteAction to be invoked when the container area is clicked.
modifier RemoteModifier to be applied to the button.
enabled Controls the enabled state of the button. When false, this button will appear visually disabled and will not be clickable. Note that only constant values are currently supported for enabled for click handling.
shape Defines the button's shape. It is recommended to use the default shape.
colors RemoteSplitRadioButtonColors that will be used to resolve the container and content colors for this button in different states.
contentPadding The spacing values to apply internally between the container and the content.
secondaryLabel A slot for a secondary label displayed below the label, or null if there is no secondary label.
label A slot for the main label content.
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: