Interface

Arrangement.Horizontal

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

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Common
@JvmDefaultWithCompatibility
    interface Horizontal

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

Properties

Common
val spacing

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

Functions

arrange

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

Horizontally places the layout children.

Parameters

totalSize Available space that can be occupied by the children, in pixels.
sizes An array of sizes of all children, in pixels.
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 An array of the size of sizes that returns the calculated positions relative to the left, in pixels.