# ContentDescriptionLabel

Artifact: [androidx.wear.watchface:watchface](https://developer.android.com/jetpack/androidx/releases/wear-watchface) [View Source](https://cs.android.com/search?q=file:androidx/wear/watchface/ContentDescriptionLabel.kt+class:androidx.wear.watchface.ContentDescriptionLabel) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0)

*** ** * ** ***


```
public final class ContentDescriptionLabel
```

<br />

*** ** * ** ***

Describes regions of the watch face for use by a screen reader.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/wear/watchface/ContentDescriptionLabel#ContentDescriptionLabel(androidx.wear.watchface.complications.data.ComplicationText,android.graphics.Rect,android.app.PendingIntent)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationText text, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Rect.html bounds, https://developer.android.com/reference/android/app/PendingIntent.html tapAction )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/wear/watchface/ContentDescriptionLabel#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Rect.html` | `https://developer.android.com/reference/androidx/wear/watchface/ContentDescriptionLabel#getBounds()()` `https://developer.android.com/reference/android/graphics/Rect.html` describing the area of the feature on screen. |
| `final https://developer.android.com/reference/android/app/PendingIntent.html` | `https://developer.android.com/reference/androidx/wear/watchface/ContentDescriptionLabel#getTapAction()()` `https://developer.android.com/reference/android/app/PendingIntent.html` to be used if the screen reader's user triggers a tap action. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationText` | `https://developer.android.com/reference/androidx/wear/watchface/ContentDescriptionLabel#getText()()` `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationText` associated with the region, to be read by the screen reader. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html` | `https://developer.android.com/reference/androidx/wear/watchface/ContentDescriptionLabel#getTextAt(android.content.res.Resources,java.time.Instant)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Resources.html resources, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html instant)` Returns the text that should be displayed for the given timestamp. |
| `int` | `https://developer.android.com/reference/androidx/wear/watchface/ContentDescriptionLabel#hashCode()()` |

## Public constructors

### ContentDescriptionLabel

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

```
public ContentDescriptionLabel(
    @NonNull ComplicationText text,
    @NonNull Rect bounds,
    PendingIntent tapAction
)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationText text` | `https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationText` associated with the region, to be read by the screen reader. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Rect.html bounds` | `https://developer.android.com/reference/android/graphics/Rect.html` describing the area of the feature on screen. |
| `https://developer.android.com/reference/android/app/PendingIntent.html tapAction` | `https://developer.android.com/reference/android/app/PendingIntent.html` to be used if the screen reader's user triggers a tap action. |

## Public methods

### equals

```
public boolean equals(Object other)
```

### getBounds

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

```
public final @NonNull Rect getBounds()
```

`https://developer.android.com/reference/android/graphics/Rect.html` describing the area of the feature on screen.

### getTapAction

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

```
public final PendingIntent getTapAction()
```

`https://developer.android.com/reference/android/app/PendingIntent.html` to be used if the screen reader's user triggers a tap action.

### getText

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

```
public final @NonNull ComplicationText getText()
```

`https://developer.android.com/reference/androidx/wear/watchface/complications/data/ComplicationText` associated with the region, to be read by the screen reader.

### getTextAt

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

```
public final @NonNull CharSequence getTextAt(@NonNull Resources resources, @NonNull Instant instant)
```

Returns the text that should be displayed for the given timestamp.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/res/Resources.html resources` | `https://developer.android.com/reference/android/content/res/Resources.html` from the current `https://developer.android.com/reference/android/content/Context.html` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html instant` | the `https://developer.android.com/reference/java/time/Instant.html` at which to sample the text |

### hashCode

```
public int hashCode()
```