# SpannedSubject.AndSpanFlags

# SpannedSubject.AndSpanFlags

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.AndSpanFlags)

*** ** * ** ***

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

<br />

```
interface SpannedSubject.AndSpanFlags
```

<br />

*** ** * ** ***

Allows additional assertions to be made on the flags of matching spans.

Identical to[WithSpanFlags](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/truth/SpannedSubject.WithSpanFlags), but this should be returned from`with...()`methods while[WithSpanFlags](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/truth/SpannedSubject.WithSpanFlags)should be returned from`has...()`methods.

See Flag constants on[Spanned](https://developer.android.com/reference/android/text/Spanned.html)for possible values.

## Summary

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [andFlags](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/truth/SpannedSubject.AndSpanFlags#andFlags(int))`(flags: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Checks that one of the matched spans has the expected`flags`. |

## Public functions

### andFlags

```
fun andFlags(flags: Int): Unit
```

Checks that one of the matched spans has the expected`flags`.  

|                                      Parameters                                      |
|--------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
| `flags: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | The expected flags. See SPAN_\* constants on[Spanned](https://developer.android.com/reference/android/text/Spanned.html)for possible values. |