# TextAlign

# TextAlign

Artifact:[androidx.glance:glance](https://developer.android.com/jetpack/androidx/releases/glance)  
[View Source](https://cs.android.com/search?q=file:androidx/glance/text/TextAlign.kt+class:androidx.glance.text.TextAlign)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0)

<br />

```
value class TextAlign
```

<br />

*** ** * ** ***

Defines the alignment of the text in its view.

## Summary

|                                                                              ### Public companion functions                                                                               |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[TextAlign](https://developer.android.com/reference/kotlin/androidx/glance/text/TextAlign)`>` | [values](https://developer.android.com/reference/kotlin/androidx/glance/text/TextAlign#values())`()` Return a list containing all possible values of TextAlign. |

|                              ### Public companion properties                               |
|--------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
| [TextAlign](https://developer.android.com/reference/kotlin/androidx/glance/text/TextAlign) | [Center](https://developer.android.com/reference/kotlin/androidx/glance/text/TextAlign#Center()) Align the text in the center of the container.     |
| [TextAlign](https://developer.android.com/reference/kotlin/androidx/glance/text/TextAlign) | [End](https://developer.android.com/reference/kotlin/androidx/glance/text/TextAlign#End()) Align the text on the trailing edge of the container.    |
| [TextAlign](https://developer.android.com/reference/kotlin/androidx/glance/text/TextAlign) | [Left](https://developer.android.com/reference/kotlin/androidx/glance/text/TextAlign#Left()) Align the text on the left edge of the container.      |
| [TextAlign](https://developer.android.com/reference/kotlin/androidx/glance/text/TextAlign) | [Right](https://developer.android.com/reference/kotlin/androidx/glance/text/TextAlign#Right()) Align the text on the right edge of the container.   |
| [TextAlign](https://developer.android.com/reference/kotlin/androidx/glance/text/TextAlign) | [Start](https://developer.android.com/reference/kotlin/androidx/glance/text/TextAlign#Start()) Align the text on the leading edge of the container. |

|                                   ### Public functions                                   |
|------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|
| `open `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | [toString](https://developer.android.com/reference/kotlin/androidx/glance/text/TextAlign#toString())`()` |

## Public companion functions

### values

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0)  

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

Return a list containing all possible values of TextAlign.  

## Public companion properties

### Center

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0)  

```
val Center: TextAlign
```

Align the text in the center of the container.  

### End

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0)  

```
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.  

### Left

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0)  

```
val Left: TextAlign
```

Align the text on the left edge of the container.  

### Right

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0)  

```
val Right: TextAlign
```

Align the text on the right edge of the container.  

### Start

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/glance#1.0.0)  

```
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.  

## Public functions

### toString

```
open fun toString(): String
```