# ContentDescriptionLabel

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/wear/watchface/ContentDescriptionLabel "View this page in Java")

<br />

```
class ContentDescriptionLabel
```

<br />

*** ** * ** ***

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

## Summary

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

|                                        ### Public functions                                         |
|-----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `open operator `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [equals](https://developer.android.com/reference/kotlin/androidx/wear/watchface/ContentDescriptionLabel#equals(kotlin.Any))`(other: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)`                                                                                                                                                                                                                    |
| [CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)      | [getTextAt](https://developer.android.com/reference/kotlin/androidx/wear/watchface/ContentDescriptionLabel#getTextAt(android.content.res.Resources,java.time.Instant))`(resources: `[Resources](https://developer.android.com/reference/android/content/res/Resources.html)`, instant: `[Instant](https://developer.android.com/reference/java/time/Instant.html)`)` Returns the text that should be displayed for the given timestamp. |
| `open `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                  | [hashCode](https://developer.android.com/reference/kotlin/androidx/wear/watchface/ContentDescriptionLabel#hashCode())`()`                                                                                                                                                                                                                                                                                                               |

|                                                     ### Public properties                                                      |
|--------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Rect](https://developer.android.com/reference/android/graphics/Rect.html)                                                     | [bounds](https://developer.android.com/reference/kotlin/androidx/wear/watchface/ContentDescriptionLabel#bounds()) [Rect](https://developer.android.com/reference/android/graphics/Rect.html)describing the area of the feature on screen.                                                                |
| [PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)`?`                                     | [tapAction](https://developer.android.com/reference/kotlin/androidx/wear/watchface/ContentDescriptionLabel#tapAction()) [PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html)to be used if the screen reader's user triggers a tap action.                             |
| [ComplicationText](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationText) | [text](https://developer.android.com/reference/kotlin/androidx/wear/watchface/ContentDescriptionLabel#text()) [ComplicationText](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationText)associated with the region, to be read by the screen reader. |

## Public constructors

### ContentDescriptionLabel

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

```
ContentDescriptionLabel(
    text: ComplicationText,
    bounds: Rect,
    tapAction: PendingIntent?
)
```  

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

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```  

### getTextAt

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

```
fun getTextAt(resources: Resources, instant: Instant): CharSequence
```

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

|                                              Parameters                                              |
|------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `resources: `[Resources](https://developer.android.com/reference/android/content/res/Resources.html) | [Resources](https://developer.android.com/reference/android/content/res/Resources.html)from the current[android.content.Context](https://developer.android.com/reference/android/content/Context.html) |
| `instant: `[Instant](https://developer.android.com/reference/java/time/Instant.html)                 | the[Instant](https://developer.android.com/reference/java/time/Instant.html)at which to sample the text                                                                                                |

### hashCode

```
open fun hashCode(): Int
```  

## Public properties

### bounds

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

```
val bounds: Rect
```

[Rect](https://developer.android.com/reference/android/graphics/Rect.html)describing the area of the feature on screen.  

### tapAction

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

```
val tapAction: PendingIntent?
```

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

### text

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

```
val text: ComplicationText
```

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