# 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)

*** ** * ** ***


```
public sealed class AnnotationPosition
```

<br />

*** ** * ** ***

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

## Summary

| ### Public fields |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/text/vertical/AnnotationPosition#value()` The integer representation of this position, used for serialization. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/text/vertical/AnnotationPosition` | `https://developer.android.com/reference/androidx/text/vertical/AnnotationPosition#After()` For horizontal text, the text annotation should be positioned below the base text. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/text/vertical/AnnotationPosition` | `https://developer.android.com/reference/androidx/text/vertical/AnnotationPosition#Before()` For horizontal text, the text annotation should be positioned above the base text. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/text/vertical/AnnotationPosition` | `https://developer.android.com/reference/androidx/text/vertical/AnnotationPosition#Unknown()` The text annotation position is unknown. |

| ### Protected constructors |
|---|
| `https://developer.android.com/reference/androidx/text/vertical/AnnotationPosition#AnnotationPosition(kotlin.Int)(int value)` |

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/text/vertical/AnnotationPosition` | `https://developer.android.com/reference/androidx/text/vertical/AnnotationPosition#fromInt(kotlin.Int)(int value)` |

## Public fields

### value

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

```
public final int value
```

The integer representation of this position, used for serialization.

### After

```
public static final @NonNull AnnotationPosition After
```

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

```
public static final @NonNull AnnotationPosition Before
```

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

```
public static final @NonNull AnnotationPosition Unknown
```

The text annotation position is unknown.

## Protected constructors

### AnnotationPosition

```
protected AnnotationPosition(int value)
```

## Public methods

### fromInt

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

```
public static final @NonNull AnnotationPosition fromInt(int value)
```