Google is committed to advancing racial equity for Black communities. See how.

RadioGroupScope

@Stable class RadioGroupScope
kotlin.Any
   ↳ androidx.ui.material.RadioGroupScope

Scope of RadioGroup to grant access to RadioGroupItem and others. This scope will be provided automatically to the children of RadioGroup.

Summary

Public methods
Unit
RadioGroupItem(selected: Boolean, onSelect: () -> Unit, modifier: Modifier = Modifier, content: () -> Unit)

Basic item to be used inside RadioGroup.

Unit
RadioGroupTextItem(selected: Boolean, onSelect: () -> Unit, text: String, modifier: Modifier = Modifier, radioColor: Color = MaterialTheme.colors.secondary, textStyle: TextStyle? = null)

Simple component to be used inside RadioGroup as a child.

Public methods

RadioGroupItem

@Composable fun RadioGroupItem(
    selected: Boolean,
    onSelect: () -> Unit,
    modifier: Modifier = Modifier,
    content: () -> Unit
): Unit

Deprecated.

Basic item to be used inside RadioGroup.

This component provides basic radio item behavior such as clicks and accessibility support.

If you need simple item with RadioButton and Text wrapped in a Row, consider using RadioGroupTextItem.

Parameters
selected: Boolean whether or not this item is selected
onSelect: () -> Unit callback to be invoked when your item is being clicked, therefore the selection of this item is requested. Not invoked if item is already selected
modifier: Modifier = Modifier Modifier to be applied to this item

RadioGroupTextItem

@Composable fun RadioGroupTextItem(
    selected: Boolean,
    onSelect: () -> Unit,
    text: String,
    modifier: Modifier = Modifier,
    radioColor: Color = MaterialTheme.colors.secondary,
    textStyle: TextStyle? = null
): Unit

Deprecated.

Simple component to be used inside RadioGroup as a child. Places RadioButton and Text inside the Row.

Parameters
selected: Boolean whether or not radio button in this item is selected
onSelect: () -> Unit callback to be invoked when your item is being clicked, therefore the selection of this item is requested. Not invoked if item is already selected
text: String to put as a label description of this item
modifier: Modifier = Modifier Modifier to be applied to this item
radioColor: Color = MaterialTheme.colors.secondary color for RadioButtons when selected
textStyle: TextStyle? = null parameters for text customization