ContentDescriptionLabel

class ContentDescriptionLabel


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

Summary

Public constructors

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

Public functions

open operator Boolean
equals(other: Any?)
CharSequence
getTextAt(resources: Resources, instant: Instant)

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

open Int

Public properties

Rect

Rect describing the area of the feature on screen.

PendingIntent?

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

ComplicationText

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

Public constructors

ContentDescriptionLabel

Added in 1.0.0
ContentDescriptionLabel(
    text: ComplicationText,
    bounds: Rect,
    tapAction: PendingIntent?
)
Parameters
text: ComplicationText

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

bounds: Rect

Rect describing the area of the feature on screen.

tapAction: PendingIntent?

PendingIntent 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
fun getTextAt(resources: Resources, instant: Instant): CharSequence

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

open fun hashCode(): Int

Public properties

bounds

Added in 1.0.0
val boundsRect

Rect describing the area of the feature on screen.

tapAction

Added in 1.0.0
val tapActionPendingIntent?

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

text

Added in 1.0.0
val textComplicationText

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