# SpannedSubject.Aligned

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

*** ** * ** ***


```
public interface SpannedSubject.Aligned
```

<br />

*** ** * ** ***

Allows assertions about the alignment of a span.

## Summary

| ### Public methods |
|---|---|
| `abstract https://developer.android.com/reference/androidx/media3/test/utils/truth/SpannedSubject.AndSpanFlags` | `https://developer.android.com/reference/androidx/media3/test/utils/truth/SpannedSubject.Aligned#withAlignment(android.text.Layout.Alignment)(https://developer.android.com/reference/android/text/Layout.Alignment.html alignment)` Checks that at least one of the matched spans has the expected `alignment`. |

## Public methods

### withAlignment

```
abstract SpannedSubject.AndSpanFlags withAlignment(Layout.Alignment alignment)
```

Checks that at least one of the matched spans has the expected `alignment`.

| Parameters |
|---|---|
| `https://developer.android.com/reference/android/text/Layout.Alignment.html alignment` | The expected alignment. |

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