Start native apps faster with the Composables CLI ->
Interface

SpatialAlignment.Horizontal

An interface to calculate the alignment of a box of a certain size inside an available width.

Source set: Android
public interface Horizontal

An interface to calculate the alignment of a box of a certain size inside an available width.

Functions

align

public fun align(size: Int, space: Int, layoutDirection: LayoutDirection): Int

Provides the horizontal alignment offset from the origin of the space to the origin of the content.

Parameters

size The content size in pixels.
space The available space in pixels.
layoutDirection LTR or RTL.

Last updated: