Interface

RemoteButtonGroupScope

Scope for the children of a RemoteButtonGroup.

Source set: Android
public sealed interface RemoteButtonGroupScope

Scope for the children of a RemoteButtonGroup.

Each child should build its own modifier chain and chain RemoteButtonGroupScope modifiers (weight, minWidth, animateWidth) contiguously before any other modifiers; do not share a scope modifier instance across multiple children.

Functions

weight

Source set: Android
public fun RemoteModifier.weight(weight: RemoteFloat): RemoteModifier

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

Parameters

weight The proportional width to give to this element, as a multiplier of the total available width. Must be a positive constant.

Return

a RemoteModifier that sizes the element's width proportional to weight

minWidth

Source set: Android
public fun RemoteModifier.minWidth(
        minWidth: RemoteDp = RemoteButtonGroupDefaults.MinWidth
    ): RemoteModifier

Sets the minimum width of this item, defaults to RemoteButtonGroupDefaults.MinWidth.

Parameters

minWidth The minimum width to use for this item. Must be a positive constant.

Return

a RemoteModifier that sets the minimum width of the item to minWidth

animateWidth

Source set: Android
public fun RemoteModifier.animateWidth(): RemoteModifier

Specifies that this item should animate its width when pressed, expanding its resting width by RemoteButtonGroup's expansionWidth delta while neighboring items shrink accordingly.

The animation needs touch actions, so it's skipped when the creation profile doesn't support them.

Return

a RemoteModifier that animates the item's width when pressed

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: