The second Android 11 Developer Preview is now available, test it out and share your feedback.

Arrangement

@Immutable interface Arrangement
androidx.ui.layout.Arrangement

Used to specify the arrangement of the layout's children in Row or Column in the main axis direction (horizontal and vertical, respectively).

Summary

Nested classes

Place children vertically such that they are as close as possible to the bottom of the main axis.

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

Place children horizontally such that they are as close as possible to the end of the main axis.

abstract

Used to specify the horizontal arrangement of the layout's children in a Row.

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

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

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

Place children horizontally such that they are as close as possible to the beginning of the main axis.

Place children vertically such that they are as close as possible to the top of the main axis.

abstract

Used to specify the vertical arrangement of the layout's children in a Column.

Public methods

abstract List<IntPx>
arrange(totalSize: IntPx, size: List<IntPx>, layoutDirection: LayoutDirection)

Places the layout children inside the parent layout along the main axis.

Public methods

arrange

abstract fun arrange(
    totalSize: IntPx,
    size: List<IntPx>,
    layoutDirection: LayoutDirection
): List<IntPx>

Places the layout children inside the parent layout along the main axis.

Parameters
totalSize: IntPx Available space that can be occupied by the children.
size: List<IntPx> A list of sizes of all children.
layoutDirection: LayoutDirection A layout direction, left-to-right or right-to-left, of the parent layout that should be taken into account when determining positions of the children in horizontal direction.