Google is committed to advancing racial equity for Black communities. See how.

ContentDescriptionLabel

class ContentDescriptionLabel
kotlin.Any
   ↳ androidx.wear.watchface.client.InteractiveWatchFaceSysUiClient.ContentDescriptionLabel

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

Summary

Public constructors
<init>(text: TimeDependentText, bounds: Rect, tapAction: PendingIntent?)

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

Public methods
Boolean
equals(other: Any?)

CharSequence
getTextAt(resources: Resources, dateTimeMillis: Long)

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

Int

Properties
Rect

Area of the feature on screen.

PendingIntent?

PendingIntent to be used if the screen reader's user triggers a tap action.

Public constructors

<init>

ContentDescriptionLabel(
    text: TimeDependentText,
    bounds: Rect,
    tapAction: PendingIntent?)

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

Public methods

equals

fun equals(other: Any?): Boolean

getTextAt

fun getTextAt(
    resources: Resources,
    dateTimeMillis: Long
): CharSequence

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

Parameters
resources: Resources Resources from the current android.content.Context
dateTimeMillis: Long milliseconds since epoch, e.g. from System.currentTimeMillis

hashCode

fun hashCode(): Int

Properties

bounds

val bounds: Rect

Area of the feature on screen.

tapAction

val tapAction: PendingIntent?

PendingIntent to be used if the screen reader's user triggers a tap action.