# TextDecoration

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


```
value class TextDecoration
```

<br />

*** ** * ** ***

Defines a horizontal line to be drawn on the text.

## Summary

| ### Public companion functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/glance/text/TextDecoration` | `https://developer.android.com/reference/kotlin/androidx/glance/text/TextDecoration#combine(kotlin.collections.List)(decorations: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/glance/text/TextDecoration>)` Creates a decoration that includes all the given decorations. |

| ### Public companion properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/glance/text/TextDecoration` | `https://developer.android.com/reference/kotlin/androidx/glance/text/TextDecoration#LineThrough()` Draws a horizontal line over the text. |
| `https://developer.android.com/reference/kotlin/androidx/glance/text/TextDecoration` | `https://developer.android.com/reference/kotlin/androidx/glance/text/TextDecoration#None()` |
| `https://developer.android.com/reference/kotlin/androidx/glance/text/TextDecoration` | `https://developer.android.com/reference/kotlin/androidx/glance/text/TextDecoration#Underline()` Draws a horizontal line below the text. |

| ### Public functions |
|---|---|
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/glance/text/TextDecoration#contains(androidx.glance.text.TextDecoration)(other: https://developer.android.com/reference/kotlin/androidx/glance/text/TextDecoration)` Check whether this `https://developer.android.com/reference/kotlin/androidx/glance/text/TextDecoration` contains the given decoration. |
| `operator https://developer.android.com/reference/kotlin/androidx/glance/text/TextDecoration` | `https://developer.android.com/reference/kotlin/androidx/glance/text/TextDecoration#plus(androidx.glance.text.TextDecoration)(decoration: https://developer.android.com/reference/kotlin/androidx/glance/text/TextDecoration)` Creates a decoration that includes both of the TextDecorations. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/glance/text/TextDecoration#toString()()` |

## Public companion functions

### combine

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

```
fun combine(decorations: List<TextDecoration>): TextDecoration
```

Creates a decoration that includes all the given decorations.

| Parameters |
|---|---|
| `decorations: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/glance/text/TextDecoration>` | The decorations to be added |

## Public companion properties

### LineThrough

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

```
val LineThrough: TextDecoration
```

Draws a horizontal line over the text.

Note: This will have no effect if used on Wear Tiles.

### None

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

```
val None: TextDecoration
```

### Underline

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

```
val Underline: TextDecoration
```

Draws a horizontal line below the text.

## Public functions

### contains

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

```
operator fun contains(other: TextDecoration): Boolean
```

Check whether this `https://developer.android.com/reference/kotlin/androidx/glance/text/TextDecoration` contains the given decoration.

### plus

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

```
operator fun plus(decoration: TextDecoration): TextDecoration
```

Creates a decoration that includes both of the TextDecorations.

### toString

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