SpatialArrangement

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

Summary

Nested types

Used to specify arrangement which doesn't change with layout direction.

Used to specify the horizontal arrangement of the layout's children in horizontal layouts like SpatialRow, or the vertical arrangement of the layout's children in vertical layouts like SpatialColumn.

Used to specify the horizontal arrangement of the layout's children in layouts like SpatialRow.

Used to specify the vertical arrangement of the layout's children in layouts like SpatialColumn.

Public functions

SpatialArrangement.Horizontal

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

SpatialArrangement.Vertical

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

SpatialArrangement.AxisIndependent
spacedBy(space: Dp)

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

SpatialArrangement.Horizontal
spacedBy(space: Dp, spatialAlignment: SpatialAlignment.Horizontal)

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

SpatialArrangement.Vertical
spacedBy(space: Dp, spatialAlignment: SpatialAlignment.Vertical)

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

Public properties

SpatialArrangement.Vertical

All children should be arranged at the bottom of the column.

SpatialArrangement.AxisIndependent

All children should be arranged at the center of the row or column.

SpatialArrangement.Horizontal

All children should be arranged at the end of the row (right if the layout direction is LTR, right otherwise).

SpatialArrangement.AxisIndependent

There should be equal space around each child.

SpatialArrangement.AxisIndependent

There should be equal space between the children and no space before the first child or after the last child.

SpatialArrangement.AxisIndependent

There should be equal space between the children and before the first child and after the last child.

SpatialArrangement.Horizontal

All children should be arranged at the start of the row (left if the layout direction is LTR, right otherwise).

SpatialArrangement.Vertical

All children should be arranged at the top of the column.

Public functions

aligned

Added in 1.0.0-alpha07
fun aligned(spatialAlignment: SpatialAlignment.Horizontal): SpatialArrangement.Horizontal

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

aligned

Added in 1.0.0-alpha07
fun aligned(spatialAlignment: SpatialAlignment.Vertical): SpatialArrangement.Vertical

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

spacedBy

Added in 1.0.0-alpha07
fun spacedBy(space: Dp): SpatialArrangement.AxisIndependent

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

spacedBy

Added in 1.0.0-alpha07
fun spacedBy(space: Dp, spatialAlignment: SpatialAlignment.Horizontal): SpatialArrangement.Horizontal

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

spacedBy

Added in 1.0.0-alpha07
fun spacedBy(space: Dp, spatialAlignment: SpatialAlignment.Vertical): SpatialArrangement.Vertical

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

Public properties

Bottom

Added in 1.0.0-alpha07
val BottomSpatialArrangement.Vertical

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

Center

Added in 1.0.0-alpha07
val CenterSpatialArrangement.AxisIndependent

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

End

Added in 1.0.0-alpha07
val EndSpatialArrangement.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

SpaceAround

Added in 1.0.0-alpha07
val SpaceAroundSpatialArrangement.AxisIndependent

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

SpaceBetween

Added in 1.0.0-alpha07
val SpaceBetweenSpatialArrangement.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

SpaceEvenly

Added in 1.0.0-alpha07
val SpaceEvenlySpatialArrangement.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

Start

Added in 1.0.0-alpha07
val StartSpatialArrangement.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

Top

Added in 1.0.0-alpha07
val TopSpatialArrangement.Vertical

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