ButtonGroupScope


Button group scope used to indicate a Modifier.weight of a child element.

Summary

Public functions

Modifier
Modifier.weight(
    weight: @FloatRange(from = 0.0, fromInclusive = false) Float,
    fill: Boolean
)

Size the element's width proportional to its weight relative to other weighted sibling elements in the ButtonGroup.

Cmn

Public functions

fun Modifier.weight(
    weight: @FloatRange(from = 0.0, fromInclusive = false) Float,
    fill: Boolean = true
): Modifier

Size the element's width proportional to its weight relative to other weighted sibling elements in the ButtonGroup. The parent will divide the horizontal space remaining after measuring unweighted child elements and distribute it according to this weight. When fill is true, the element will be forced to occupy the whole width allocated to it. Otherwise, the element is allowed to be smaller - this will result in ButtonGroup being smaller, as the unused allocated width will not be redistributed to other siblings.

Parameters
weight: @FloatRange(from = 0.0, fromInclusive = false) Float

The proportional width to give to this element, as related to the total of all weighted siblings. Must be positive.

fill: Boolean = true

When true, the element will occupy the whole width allocated.