Start native apps faster with the Composables CLI ->
Interface

SpatialRowScope

Scope for customizing the layout of children within a SpatialRow.

Source set: Android
public interface SpatialRowScope

Scope for customizing the layout of children within a SpatialRow.

Functions

weight

Source set: Android
public fun SubspaceModifier.weight(
        @FloatRange(from = 0.0, fromInclusive = false) weight: Float,
        fill: Boolean = true,
    ): SubspaceModifier

Sizes the element's width proportionally to its weight relative to other weighted sibling elements in the SpatialRow.

The parent divides the remaining horizontal space after measuring unweighted children and distributes it according to the weights.

If fill is true, the element will occupy its entire allocated width. Otherwise, it can be smaller, potentially making the SpatialRow smaller as unused space isn't redistributed.

Parameters

weight The proportional width for this element relative to other weighted siblings. Must be positive.
fill Whether the element should fill its entire allocated width.

Return

The modified SubspaceModifier.

align

Source set: Android
public fun SubspaceModifier.align(alignment: SpatialAlignment.Vertical): SubspaceModifier

Aligns the element vertically within the SpatialRow, overriding the row's default vertical alignment.

Parameters

alignment The vertical alignment to apply.

Return

The modified SubspaceModifier.

align

Source set: Android
public fun SubspaceModifier.align(alignment: SpatialAlignment.Depth): SubspaceModifier

Aligns the element depthwise within the SpatialRow, overriding the row's default depth alignment.

Parameters

alignment The depth alignment to apply.

Return

The modified SubspaceModifier.