Compose Unstyled 2.0 is out! Check the official announcement blog ->
Object

SpatialArrangement.Absolute

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

Source set: Android
public object Absolute

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

Properties

Left

Source set: Android
public val Left: Horizontal

All children should be arranged at the left of the androidx.xr.compose.subspace.SpatialRow. Unlike SpatialArrangement.Start, when layout direction is RTL, children will not be mirrored. Visually: 123####

Center

Source set: Android
public val Center: Horizontal

All children should be arranged at the center of the androidx.xr.compose.subspace.SpatialRow. Unlike SpatialArrangement.Center, when layout direction is RTL, children will not be mirrored. Visually: ##123##

Source set: Android
public val Right: Horizontal

All children should be arranged at the right of the androidx.xr.compose.subspace.SpatialRow. Unlike SpatialArrangement.End, when layout direction is RTL, children will not be mirrored. Visually: ####123

SpaceEvenly

Source set: Android
public val SpaceEvenly: Horizontal

There should be equal space between the children and before the first child and after the last child. Unlike SpatialArrangement.SpaceEvenly, when layout direction is RTL, children will not be mirrored. Visually: #1#2#3#

SpaceBetween

Source set: Android
public val SpaceBetween: Horizontal

There should be equal space between the children and no space before the first child or after the last child. Unlike SpatialArrangement.SpaceBetween, when layout direction is RTL, children will not be mirrored. Visually: 1##2##3

SpaceAround

Source set: Android
public val SpaceAround: Horizontal

There should be equal space around each child. Unlike SpatialArrangement.SpaceAround, when layout direction is RTL, children will not be mirrored. Visually: #1##2##3##4#

Functions

spacedBy

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

Children are placed next to each other with fixed space between them horizontally and align them according to the spatialAlignment given. Unlike SpatialArrangement.spacedBy, when layout direction is RTL, children will not be mirrored.

Parameters

space fixed space Dp to place between adjacent children.
spatialAlignment SpatialAlignment.Horizontal to align the children with.

aligned

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

Children placed next to each other horizontally and align them according to the spatialAlignment given. Unlike SpatialArrangement.spacedBy, when layout direction is RTL, children will not be mirrored.

Parameters

spatialAlignment SpatialAlignment.Horizontal to align the children with.

Last updated: