Alignment

@Immutable interface Alignment
androidx.ui.core.Alignment

An interface to position a point inside a 2D box. Alignment is often used to define the alignment of a box inside a parent container.

Summary

Nested classes

abstract

An interface that positions a point on a 1D horizontal finite line.

abstract

An interface that positions a point on a 1D vertical finite line.

Public methods

abstract IntPxPosition
align(size: IntPxSize, layoutDirection: LayoutDirection = LayoutDirection.Ltr)

Returns the position of a 2D point in a container of a given size, according to this Alignment.

Companion properties

Alignment.Vertical

Alignment

Alignment

Alignment

Alignment

Alignment

Alignment.Horizontal

Alignment

Alignment.Vertical

Alignment.Horizontal

Alignment.Horizontal

Alignment.Vertical

Alignment

Alignment

Alignment

Public methods

align

abstract fun align(
    size: IntPxSize,
    layoutDirection: LayoutDirection = LayoutDirection.Ltr
): IntPxPosition

Returns the position of a 2D point in a container of a given size, according to this Alignment.

Companion properties

Bottom

val Bottom: Alignment.Vertical

BottomCenter

val BottomCenter: Alignment

BottomEnd

val BottomEnd: Alignment

BottomStart

val BottomStart: Alignment

Center

val Center: Alignment

CenterEnd

val CenterEnd: Alignment

CenterHorizontally

val CenterHorizontally: Alignment.Horizontal

CenterStart

val CenterStart: Alignment

CenterVertically

val CenterVertically: Alignment.Vertical

End

val End: Alignment.Horizontal

Start

val Start: Alignment.Horizontal

Top

val Top: Alignment.Vertical

TopCenter

val TopCenter: Alignment

TopEnd

val TopEnd: Alignment

TopStart

val TopStart: Alignment