# TextEmphasisSpan

Artifact: [androidx.media3:media3-common](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/common/text/TextEmphasisSpan.java+class:androidx.media3.common.text.TextEmphasisSpan)

*** ** * ** ***


```
@UnstableApi
public final class TextEmphasisSpan implements LanguageFeatureSpan
```

<br />

*** ** * ** ***

A styling span for text emphasis marks.

These are pronunciation aids such as [Japanese boutens](https://www.w3.org/TR/jlreq/?lang=en#term.emphasis-dots) which can be rendered using the [text-emphasis](https://developer.mozilla.org/en-US/docs/Web/CSS/text-emphasis) CSS property.

## Summary

| ### Nested types |
|---|
| `@https://developer.android.com/reference/java/lang/annotation/Documented.html @https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/java/lang/annotation/Target.html(value = https://developer.android.com/reference/java/lang/annotation/ElementType.html#TYPE_USE) @https://developer.android.com/reference/androidx/annotation/IntDef(value = ) public annotation https://developer.android.com/reference/androidx/media3/common/text/TextEmphasisSpan.MarkFill` The possible mark fills that can be used. |
| `@https://developer.android.com/reference/java/lang/annotation/Documented.html @https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/java/lang/annotation/Target.html(value = https://developer.android.com/reference/java/lang/annotation/ElementType.html#TYPE_USE) @https://developer.android.com/reference/androidx/annotation/IntDef(value = ) public annotation https://developer.android.com/reference/androidx/media3/common/text/TextEmphasisSpan.MarkShape` The possible mark shapes that can be used. |

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/media3/common/text/TextEmphasisSpan#MARK_FILL_FILLED() = 1` |
| `static final int` | `https://developer.android.com/reference/androidx/media3/common/text/TextEmphasisSpan#MARK_FILL_OPEN() = 2` |
| `static final int` | `https://developer.android.com/reference/androidx/media3/common/text/TextEmphasisSpan#MARK_FILL_UNKNOWN() = 0` |
| `static final int` | `https://developer.android.com/reference/androidx/media3/common/text/TextEmphasisSpan#MARK_SHAPE_CIRCLE() = 1` |
| `static final int` | `https://developer.android.com/reference/androidx/media3/common/text/TextEmphasisSpan#MARK_SHAPE_DOT() = 2` |
| `static final int` | `https://developer.android.com/reference/androidx/media3/common/text/TextEmphasisSpan#MARK_SHAPE_NONE() = 0` |
| `static final int` | `https://developer.android.com/reference/androidx/media3/common/text/TextEmphasisSpan#MARK_SHAPE_SESAME() = 3` |

| ### Public fields |
|---|---|
| `int` | `@https://developer.android.com/reference/androidx/media3/common/text/TextEmphasisSpan.MarkFill https://developer.android.com/reference/androidx/media3/common/text/TextEmphasisSpan#markFill()` The mark fill for the text emphasis mark. |
| `int` | `@https://developer.android.com/reference/androidx/media3/common/text/TextEmphasisSpan.MarkShape https://developer.android.com/reference/androidx/media3/common/text/TextEmphasisSpan#markShape()` The mark shape used for text emphasis. |
| `final int` | `@https://developer.android.com/reference/androidx/media3/common/text/TextAnnotation.Position https://developer.android.com/reference/androidx/media3/common/text/TextEmphasisSpan#position()` The position of the text emphasis relative to the base text. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/common/text/TextEmphasisSpan#TextEmphasisSpan(int,int,int)( @https://developer.android.com/reference/androidx/media3/common/text/TextEmphasisSpan.MarkShape int shape, @https://developer.android.com/reference/androidx/media3/common/text/TextEmphasisSpan.MarkFill int fill, @https://developer.android.com/reference/androidx/media3/common/text/TextAnnotation.Position int position )` |

| ### Public methods |
|---|---|
| `static https://developer.android.com/reference/androidx/media3/common/text/TextEmphasisSpan` | `https://developer.android.com/reference/androidx/media3/common/text/TextEmphasisSpan#fromBundle(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle.html bundle)` |
| `https://developer.android.com/reference/android/os/Bundle.html` | `https://developer.android.com/reference/androidx/media3/common/text/TextEmphasisSpan#toBundle()()` |

## Constants

### MARK_FILL_FILLED

```
public static final int MARK_FILL_FILLED = 1
```

### MARK_FILL_OPEN

```
public static final int MARK_FILL_OPEN = 2
```

### MARK_FILL_UNKNOWN

```
public static final int MARK_FILL_UNKNOWN = 0
```

### MARK_SHAPE_CIRCLE

```
public static final int MARK_SHAPE_CIRCLE = 1
```

### MARK_SHAPE_DOT

```
public static final int MARK_SHAPE_DOT = 2
```

### MARK_SHAPE_NONE

```
public static final int MARK_SHAPE_NONE = 0
```

### MARK_SHAPE_SESAME

```
public static final int MARK_SHAPE_SESAME = 3
```

## Public fields

### markFill

```
@TextEmphasisSpan.MarkFill
public int markFill
```

The mark fill for the text emphasis mark.

### markShape

```
@TextEmphasisSpan.MarkShape
public int markShape
```

The mark shape used for text emphasis.

### position

```
@TextAnnotation.Position
public final int position
```

The position of the text emphasis relative to the base text.

## Public constructors

### TextEmphasisSpan

```
public TextEmphasisSpan(
    @TextEmphasisSpan.MarkShape int shape,
    @TextEmphasisSpan.MarkFill int fill,
    @TextAnnotation.Position int position
)
```

## Public methods

### fromBundle

```
public static TextEmphasisSpan fromBundle(Bundle bundle)
```

### toBundle

```
public Bundle toBundle()
```