Google is committed to advancing racial equity for Black communities. See how.

AbsoluteArrangement

@Immutable object AbsoluteArrangement
kotlin.Any
   ↳ androidx.compose.foundation.layout.AbsoluteArrangement

Summary

Public methods
Arrangement.Horizontal

Place children horizontally one next to the other and align the obtained group according to an alignment.

Arrangement.HorizontalOrVertical
spacedBy(space: Dp)

Place children such that each two adjacent ones are spaced by a fixed space distance across the main axis.

Arrangement.Horizontal
spacedBy(space: Dp, alignment: Alignment.Horizontal)

Place children horizontally such that each two adjacent ones are spaced by a fixed space distance.

Arrangement.Vertical
spacedBy(space: Dp, alignment: Alignment.Vertical)

Place children vertically such that each two adjacent ones are spaced by a fixed space distance.

Properties
Arrangement.Horizontal

Place children such that they are as close as possible to the middle of the Row.

Arrangement.Horizontal

Place children horizontally such that they are as close as possible to the left edge of the Row.

Arrangement.Horizontal

Place children horizontally such that they are as close as possible to the right edge of the Row.

Arrangement.Horizontal

Place children such that they are spaced evenly horizontally, including free space before the first child and after the last child, but half the amount of space existing otherwise between two consecutive children.

Arrangement.Horizontal

Place children such that they are spaced evenly across the main axis, without free space before the first child or after the last child.

Arrangement.Horizontal

Place children such that they are spaced evenly across the main axis, including free space before the first child and after the last child.

Public methods

aligned

fun aligned(alignment: Alignment.Horizontal): Arrangement.Horizontal

Place children horizontally one next to the other and align the obtained group according to an alignment.

Unlike Arrangement.aligned, when the layout direction is RTL, the children will not be mirrored and as such children will appear in the order they are composed inside the Row.

Parameters
alignment: Alignment.Horizontal The alignment of the children inside the parent.

spacedBy

fun spacedBy(space: Dp): Arrangement.HorizontalOrVertical

Place children such that each two adjacent ones are spaced by a fixed space distance across the main axis. The spacing will be subtracted from the available space that the children can occupy.

Unlike Arrangement.spacedBy, when the layout direction is RTL, the children will not be mirrored and as such children will appear in the order they are composed inside the Row.

Parameters
space: Dp The space between adjacent children.

spacedBy

fun spacedBy(
    space: Dp,
    alignment: Alignment.Horizontal
): Arrangement.Horizontal

Place children horizontally such that each two adjacent ones are spaced by a fixed space distance. The spacing will be subtracted from the available width that the children can occupy. An alignment can be specified to align the spaced children horizontally inside the parent, in case there is empty width remaining.

Unlike Arrangement.spacedBy, when the layout direction is RTL, the children will not be mirrored and as such children will appear in the order they are composed inside the Row.

Parameters
space: Dp The space between adjacent children.
alignment: Alignment.Horizontal The alignment of the spaced children inside the parent.

spacedBy

fun spacedBy(
    space: Dp,
    alignment: Alignment.Vertical
): Arrangement.Vertical

Place children vertically such that each two adjacent ones are spaced by a fixed space distance. The spacing will be subtracted from the available height that the children can occupy. An alignment can be specified to align the spaced children vertically inside the parent, in case there is empty height remaining.

Unlike Arrangement.spacedBy, when the layout direction is RTL, the children will not be mirrored and as such children will appear in the order they are composed inside the Row.

Parameters
space: Dp The space between adjacent children.
alignment: Alignment.Vertical The alignment of the spaced children inside the parent.

Properties

Center

val Center: Arrangement.Horizontal

Place children such that they are as close as possible to the middle of the Row.

Unlike Arrangement.Center, when the layout direction is RTL, the children will not be mirrored and as such children will appear in the order they are composed inside the Row.

Left

val Left: Arrangement.Horizontal

Place children horizontally such that they are as close as possible to the left edge of the Row.

Unlike Arrangement.Start, when the layout direction is RTL, the children will not be mirrored and as such children will appear in the order they are composed inside the Row.

val Right: Arrangement.Horizontal

Place children horizontally such that they are as close as possible to the right edge of the Row.

Unlike Arrangement.End, when the layout direction is RTL, the children will not be mirrored and as such children will appear in the order they are composed inside the Row.

SpaceAround

val SpaceAround: Arrangement.Horizontal

Place children such that they are spaced evenly horizontally, including free space before the first child and after the last child, but half the amount of space existing otherwise between two consecutive children.

Unlike Arrangement.SpaceAround, when the layout direction is RTL, the children will not be mirrored and as such children will appear in the order they are composed inside the Row.

SpaceBetween

val SpaceBetween: Arrangement.Horizontal

Place children such that they are spaced evenly across the main axis, without free space before the first child or after the last child.

Unlike Arrangement.SpaceBetween, when the layout direction is RTL, the children will not be mirrored and as such children will appear in the order they are composed inside the Row.

SpaceEvenly

val SpaceEvenly: Arrangement.Horizontal

Place children such that they are spaced evenly across the main axis, including free space before the first child and after the last child.

Unlike Arrangement.SpaceEvenly, when the layout direction is RTL, the children will not be mirrored and as such children will appear in the order they are composed inside the Row.