Alignment

enum class Alignment
kotlin.Any
   ↳ kotlin.Enum<androidx.ui.core.Alignment>
   ↳ androidx.ui.core.Alignment

Represents a positioning of a point inside a 2D box. Alignment is often used to define the alignment of a box inside a parent container. The coordinate space of the 2D box is the continuous -1f,1f range in both dimensions, so (verticalBias, horizontalBias) will be points in this space. (verticalBias=0f, horizontalBias=0f) represents the center of the box, (verticalBias=-1f, horizontalBias=1f) will be the top right, etc.

Summary

Enum values

Public methods

IntPxPosition

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

Enum values

BottomCenter

enum val BottomCenter : Alignment

BottomLeft

enum val BottomLeft : Alignment

BottomRight

enum val BottomRight : Alignment

Center

enum val Center : Alignment

CenterLeft

enum val CenterLeft : Alignment

CenterRight

enum val CenterRight : Alignment

TopCenter

enum val TopCenter : Alignment

TopLeft

enum val TopLeft : Alignment

TopRight

enum val TopRight : Alignment

Public methods

align

fun align(size: IntPxSize): IntPxPosition

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