SpatialColumnScope

@LayoutScopeMarker
interface SpatialColumnScope


Scope for customizing the layout of children within a SpatialColumn.

Summary

Public functions

SubspaceModifier

Aligns the element within the SpatialColumn depthwise.

SubspaceModifier

Aligns the element within the SpatialColumn horizontally.

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

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

Public functions

fun SubspaceModifier.align(alignment: SpatialAlignment.Depth): SubspaceModifier

Aligns the element within the SpatialColumn depthwise. This will override the depth alignment value passed to the SpatialColumn.

Parameters
alignment: SpatialAlignment.Depth

The depth alignment to use for the element.

Returns
SubspaceModifier

The modified SubspaceModifier.

fun SubspaceModifier.align(alignment: SpatialAlignment.Horizontal): SubspaceModifier

Aligns the element within the SpatialColumn horizontally. This will override the horizontal alignment value passed to the SpatialColumn.

Parameters
alignment: SpatialAlignment.Horizontal

The horizontal alignment to apply.

Returns
SubspaceModifier

The modified SubspaceModifier.

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

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

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

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

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

The proportional height for this element relative to other weighted siblings. Must be positive.

fill: Boolean = true

Whether the element should fill its entire allocated height.

Returns
SubspaceModifier

The modified SubspaceModifier.