align

abstract fun align(size: Int, space: Int, orientation: ComponentOrientation): Int

The child's offset from the left of space, for a child size pixels wide in a container laid out under orientation.

Return

the offset in pixels, applied without clamping.

Parameters

size

the child's own width, which an alignment reads and never changes.

space

the width offered, which is not always the container's: an arrangement placing a group of children passes the width left over.

orientation

the container's reading order; a right-to-left one mirrors the placement, so Alignment.Start resolves to the right edge.