RadioGroupScope

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

Summary

Public methods

Unit
RadioGroupItem(selected: Boolean, onSelect: () -> Unit, children: () -> Unit)

Basic item to be used inside RadioGroup.

Unit
RadioGroupTextItem(selected: Boolean, onSelect: () -> Unit, text: String, 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,
    children: () -> Unit
): Unit

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

RadioGroupTextItem

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

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
radioColor: Color = (+MaterialTheme.colors()).secondary color for RadioButtons when selected
textStyle: TextStyle? = null parameters for text customization