ContentDescriptionLabel

public final class ContentDescriptionLabel


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

Summary

Public fields

final @NonNull Rect

Rect describing the area of the feature on screen.

final PendingIntent

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

final @NonNull ComplicationText

ComplicationText associated with the region, to be read by the screen reader.

Public constructors

ContentDescriptionLabel(
    ComplicationText text,
    Rect bounds,
    PendingIntent tapAction
)

Public methods

boolean
equals(Object other)
final @NonNull CharSequence
getTextAt(Resources resources, Instant instant)

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

int

Public fields

bounds

public final @NonNull Rect bounds

Rect describing the area of the feature on screen.

tapAction

public final PendingIntent tapAction

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

text

public final @NonNull ComplicationText text

ComplicationText associated with the region, to be read by the screen reader.

Public constructors

ContentDescriptionLabel

public final ContentDescriptionLabel(
    ComplicationText text,
    Rect bounds,
    PendingIntent tapAction
)
Parameters
ComplicationText text

ComplicationText associated with the region, to be read by the screen reader.

Rect bounds

Rect describing the area of the feature on screen.

PendingIntent tapAction

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

Public methods

equals

public boolean equals(Object other)

getTextAt

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

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

Parameters
Resources resources

Resources from the current android.content.Context

Instant instant

the Instant at which to sample the text

hashCode

public int hashCode()