Object

SpatialArrangement

Used to specify the arrangement of the layout's children in layouts like SpatialRow or SpatialColumn in the main axis direction (horizontal and vertical, respectively).

Source set: Android
public object SpatialArrangement

Used to specify the arrangement of the layout's children in layouts like SpatialRow or SpatialColumn in the main axis direction (horizontal and vertical, respectively).

SpatialRow supports horizontal arrangements similar to Row: Row arrangements

SpatialColumn supports horizontal arrangements similar to Column: Column arrangements

Properties

Start

Source set: Android
public val Start: Horizontal

All children should be arranged at the start of the row (left if the layout direction is LTR, right otherwise). Visually: 123#### for LTR and ####321 for RTL

End

Source set: Android
public val End: Horizontal

All children should be arranged at the end of the row (right if the layout direction is LTR, right otherwise). Visually: ####123 for LTR and 321#### for RTL

Top

Source set: Android
public val Top: Vertical

All children should be arranged at the top of the column. Visually: (top) 123#### (bottom)

Bottom

Source set: Android
public val Bottom: Vertical

All children should be arranged at the bottom of the column. Visually: (top) ####123 (bottom)

Center

Source set: Android
public val Center: AxisIndependent

All children should be arranged at the center of the row or column. Visually: ##123## for LTR and ##321## for RTL

SpaceBetween

Source set: Android
public val SpaceBetween: AxisIndependent

There should be equal space between the children and no space before the first child or after the last child. Visually: 1##2##3 for LTR or 3##2##1 for RTL

SpaceAround

Source set: Android
public val SpaceAround: AxisIndependent

There should be equal space around each child. Visually: #1##2##3# for LTR and #3##2##1# for RTL

SpaceEvenly

Source set: Android
public val SpaceEvenly: AxisIndependent

There should be equal space between the children and before the first child and after the last child. Visually: #1#2#3# for LTR and #3#2#1# for RTL

Functions

spacedBy

public fun spacedBy(space: Dp): AxisIndependent

Children are placed next to each other with fixed space between them along the main axis.

spacedBy

public fun spacedBy(space: Dp, spatialAlignment: SpatialAlignment.Horizontal): Horizontal

Children are placed next to each other with fixed space between them horizontally and aligned them according to the spatialAlignment given.

spacedBy

public fun spacedBy(space: Dp, spatialAlignment: SpatialAlignment.Vertical): Vertical

Children are placed next to each other with fixed space between them vertically and align them according to the spatialAlignment given.

aligned

public fun aligned(spatialAlignment: SpatialAlignment.Horizontal): Horizontal

Children placed next to each other horizontally and align them according to the spatialAlignment given.

aligned

public fun aligned(spatialAlignment: SpatialAlignment.Vertical): Vertical

Children placed next to each other vertically and align them according to the spatialAlignment.

Last updated: