SpatialColumnScope
@LayoutScopeMarker
interface SpatialColumnScope
Scope for customizing the layout of children within a SpatialColumn.
Summary
Public functions |
|
|---|---|
SubspaceModifier |
SubspaceModifier.align(alignment: SpatialAlignment.Depth)Aligns the element within the |
SubspaceModifier |
SubspaceModifier.align(alignment: SpatialAlignment.Horizontal)Aligns the element within the |
SubspaceModifier |
SubspaceModifier.weight(Sizes the element's height proportionally to its |
Public functions
align
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 |
align
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 |
weight
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 |