Arrangement.Horizontal

Known direct subclasses
Arrangement.HorizontalOrVertical

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


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

Summary

Public functions

Unit
Density.arrange(
    totalSize: Int,
    sizes: IntArray,
    layoutDirection: LayoutDirection,
    outPositions: IntArray
)

Horizontally places the layout children.

Cmn

Public properties

open Dp

Spacing that should be added between any two adjacent layout children.

Cmn

Public functions

fun Density.arrange(
    totalSize: Int,
    sizes: IntArray,
    layoutDirection: LayoutDirection,
    outPositions: IntArray
): Unit

Horizontally places the layout children.

Parameters
totalSize: Int

Available space that can be occupied by the children, in pixels.

sizes: IntArray

An array of sizes of all children, in pixels.

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.

outPositions: IntArray

An array of the size of sizes that returns the calculated positions relative to the left, in pixels.

Public properties

spacing

open val spacingDp

Spacing that should be added between any two adjacent layout children.