# AnnotationPosition

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

*** ** * ** ***


```
sealed class AnnotationPosition
```

<br />

*** ** * ** ***

Represents the position of a text annotation (i.e. ruby and emphasis marks) relative to the base text.

## Summary

| ### Public companion functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/text/vertical/AnnotationPosition` | `https://developer.android.com/reference/kotlin/androidx/text/vertical/AnnotationPosition#fromInt(kotlin.Int)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |

| ### Public companion properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/text/vertical/AnnotationPosition` | `https://developer.android.com/reference/kotlin/androidx/text/vertical/AnnotationPosition#After()` For horizontal text, the text annotation should be positioned below the base text. |
| `https://developer.android.com/reference/kotlin/androidx/text/vertical/AnnotationPosition` | `https://developer.android.com/reference/kotlin/androidx/text/vertical/AnnotationPosition#Before()` For horizontal text, the text annotation should be positioned above the base text. |
| `https://developer.android.com/reference/kotlin/androidx/text/vertical/AnnotationPosition` | `https://developer.android.com/reference/kotlin/androidx/text/vertical/AnnotationPosition#Unknown()` The text annotation position is unknown. |

| ### Protected constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/text/vertical/AnnotationPosition#AnnotationPosition(kotlin.Int)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/text/vertical/AnnotationPosition#value()` The integer representation of this position, used for serialization. |

## Public companion functions

### fromInt

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

```
fun fromInt(value: Int): AnnotationPosition
```

## Public companion properties

### After

```
val After: AnnotationPosition
```

For horizontal text, the text annotation should be positioned below the base text.

For vertical text, it should be positioned to the left. See the [tts:rubyPosition](https://www.w3.org/TR/ttml2/#style-attribute-rubyPosition) attribute in TTML2 for more information.

### Before

```
val Before: AnnotationPosition
```

For horizontal text, the text annotation should be positioned above the base text.

For vertical text, it should be positioned to the right. See the [tts:rubyPosition](https://www.w3.org/TR/ttml2/#style-attribute-rubyPosition) attribute in TTML2 for more information.

### Unknown

```
val Unknown: AnnotationPosition
```

The text annotation position is unknown.

## Protected constructors

### AnnotationPosition

```
protected AnnotationPosition(value: Int)
```

## Public properties

### value

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

```
val value: Int
```

The integer representation of this position, used for serialization.