---
title: "TextAlign"
description: "Defines the alignment of the text in its view."
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-android'>Android</div>


```kotlin
public value class TextAlign internal constructor(private val value: Int)
```


Defines the alignment of the text in its view.


## Companion Object

#### Properties

<div class='sourceset sourceset-android'>Android</div>


```kotlin
public val Left: TextAlign
```


Align the text on the left edge of the container.



<div class='sourceset sourceset-android'>Android</div>


```kotlin
public val Right: TextAlign
```


Align the text on the right edge of the container.



<div class='sourceset sourceset-android'>Android</div>


```kotlin
public val Center: TextAlign
```


Align the text in the center of the container.



<div class='sourceset sourceset-android'>Android</div>


```kotlin
public val Start: TextAlign
```


Align the text on the leading edge of the container.

For Left to Right text, this is the left edge.

For Right to Left text, like Arabic, this is the right edge.



<div class='sourceset sourceset-android'>Android</div>


```kotlin
public val End: TextAlign
```


Align the text on the trailing edge of the container.

For Left to Right text, this is the right edge.

For Right to Left text, like Arabic, this is the left edge.



#### Methods

<div class='sourceset sourceset-android'>Android</div>


```kotlin
public fun values(): List<TextAlign>
```


Return a list containing all possible values of TextAlign.





