TextAlign


Defines how to align text horizontally. TextAlign controls how text aligns in the space it appears.

Summary

Public companion functions

List<TextAlign>

Return a list containing all possible values of TextAlign.

Cmn

Public companion properties

TextAlign

Align the text in the center of the container.

Cmn
TextAlign

Align the text on the trailing edge of the container.

Cmn
TextAlign

Stretch lines of text that end with a soft line break to fill the width of the container.

Cmn
TextAlign

Align the text on the left edge of the container.

Cmn
TextAlign

Align the text on the right edge of the container.

Cmn
TextAlign

Align the text on the leading edge of the container.

Cmn
TextAlign

This represents an unset value, a usual replacement for "null" when a primitive value is desired.

Cmn

Public functions

open String
Cmn

Public companion functions

values

fun values(): List<TextAlign>

Return a list containing all possible values of TextAlign.

Public companion properties

Center

val CenterTextAlign

Align the text in the center of the container.

End

val EndTextAlign

Align the text on the trailing edge of the container.

For Left to Right text (ResolvedTextDirection.Ltr), this is the right edge.

For Right to Left text (ResolvedTextDirection.Rtl), like Arabic, this is the left edge.

Justify

val JustifyTextAlign

Stretch lines of text that end with a soft line break to fill the width of the container.

Lines that end with hard line breaks are aligned towards the Start edge.

Left

val LeftTextAlign

Align the text on the left edge of the container.

Right

val RightTextAlign

Align the text on the right edge of the container.

Start

val StartTextAlign

Align the text on the leading edge of the container.

For Left to Right text (ResolvedTextDirection.Ltr), this is the left edge.

For Right to Left text (ResolvedTextDirection.Rtl), like Arabic, this is the right edge.

Unspecified

val UnspecifiedTextAlign

This represents an unset value, a usual replacement for "null" when a primitive value is desired.

Public functions

toString

open fun toString(): String