TextAlign

enum class TextAlign
kotlin.Any
   ↳ kotlin.Enum<androidx.ui.text.style.TextAlign>
   ↳ androidx.ui.text.style.TextAlign

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

Summary

Enum values

Align the text in the center of the container.

Align the text on the trailing edge of the container.

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

Align the text on the left edge of the container.

Align the text on the right edge of the container.

Align the text on the leading edge of the container.

Enum values

Center

enum val Center : TextAlign

Align the text in the center of the container.

End

enum val End : TextAlign

Align the text on the trailing edge of the container.

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

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

Justify

enum val Justify : TextAlign

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

enum val Left : TextAlign

Align the text on the left edge of the container.

Right

enum val Right : TextAlign

Align the text on the right edge of the container.

Start

enum val Start : TextAlign

Align the text on the leading edge of the container.

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

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