# SpannedSubject.EmphasizedText

# SpannedSubject.EmphasizedText

Artifact:[androidx.media3:media3-test-utils](https://developer.android.com/jetpack/androidx/releases/media3)  
[View Source](https://cs.android.com/search?q=file:androidx/media3/test/utils/truth/SpannedSubject.java+class:androidx.media3.test.utils.truth.SpannedSubject.EmphasizedText)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/test/utils/truth/SpannedSubject.EmphasizedText "View this page in Java")

<br />

```
interface SpannedSubject.EmphasizedText
```

<br />

*** ** * ** ***

Allows assertions about a span's text emphasis mark and its position.

## Summary

|                                                             ### Public functions                                                              |
|-----------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [SpannedSubject.AndSpanFlags](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/truth/SpannedSubject.AndSpanFlags)`!` | [withMarkAndPosition](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/truth/SpannedSubject.EmphasizedText#withMarkAndPosition(int,int,int))`(` ` @`[TextEmphasisSpan.MarkShape](https://developer.android.com/reference/kotlin/androidx/media3/common/text/TextEmphasisSpan.MarkShape)` markShape: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` @`[TextEmphasisSpan.MarkFill](https://developer.android.com/reference/kotlin/androidx/media3/common/text/TextEmphasisSpan.MarkFill)` markFill: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` @`[TextAnnotation.Position](https://developer.android.com/reference/kotlin/androidx/media3/common/text/TextAnnotation.Position)` position: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) `)` Checks that at least one of the matched spans has the expected`mark`and` position`. |

## Public functions

### withMarkAndPosition

```
fun withMarkAndPosition(
    @TextEmphasisSpan.MarkShape markShape: Int,
    @TextEmphasisSpan.MarkFill markFill: Int,
    @TextAnnotation.Position position: Int
): SpannedSubject.AndSpanFlags!
```

Checks that at least one of the matched spans has the expected`mark`and`
position`.  

|                                                                                                           Parameters                                                                                                            |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| `@`[TextEmphasisSpan.MarkShape](https://developer.android.com/reference/kotlin/androidx/media3/common/text/TextEmphasisSpan.MarkShape)` markShape: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | The expected mark shape.           |
| `@`[TextEmphasisSpan.MarkFill](https://developer.android.com/reference/kotlin/androidx/media3/common/text/TextEmphasisSpan.MarkFill)` markFill: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)    | The expected mark fill style.      |
| `@`[TextAnnotation.Position](https://developer.android.com/reference/kotlin/androidx/media3/common/text/TextAnnotation.Position)` position: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)        | The expected position of the mark. |

|                                                                    Returns                                                                    |
|-----------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [SpannedSubject.AndSpanFlags](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/truth/SpannedSubject.AndSpanFlags)`!` | A[AndSpanFlags](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/truth/SpannedSubject.AndSpanFlags)object for optional additional assertions on the flags. |