androidx.compose.ui.text.style
TextAlign
Value class · from org.jetbrains.compose.ui:ui-text:1.12.2
No hand-written docs yet.
Defines how to align text horizontally. TextAlign controls how text aligns in the space it appears.
value class TextAlign
How to get one
Ready-made values and functions that return it
Used by
Parameters that take a TextAlign.
Text(textAlign)TextStyle.copy(textAlign)TextStyle.merge(textAlign)
Properties
Left
val Left: TextAlign
Align the text on the left edge of the container.
Right
val Right: TextAlign
Align the text on the right edge of the container.
Center
val Center: TextAlign
Align the text in the center of the container.
Justify
val Justify: TextAlign
Stretch lines of text that end with a soft line break to fill the width of the container.
Start
val Start: TextAlign
Align the text on the leading edge of the container.
End
val End: TextAlign
Align the text on the trailing edge of the container.
Unspecified
val Unspecified: TextAlign
This represents an unset value, a usual replacement for "null" when a primitive value is desired.
value
val value: Int
Functions
values
fun values(): List<TextAlign>
Return a list containing all possible values of TextAlign.
valueOf
fun valueOf(value: Int): TextAlign
Creates a TextAlign from the given integer value. This can be useful if you need to serialize/deserialize TextAlign values.
Library docs
Defines how to align text horizontally. TextAlign controls how text aligns in the space it
appears.