MonochromaticImageComplicationData.Builder


class MonochromaticImageComplicationData.Builder


Builder for MonochromaticImageComplicationData.

You must at a minimum set the monochromaticImage and contentDescription fields.

Summary

Public constructors

Builder(
    monochromaticImage: MonochromaticImage,
    contentDescription: ComplicationText
)

Public functions

open MonochromaticImageComplicationData

Builds the MonochromaticImageComplicationData.

MonochromaticImageComplicationData.Builder

Sets optional pending intent to be invoked when the complication is tapped.

MonochromaticImageComplicationData.Builder
setValidTimeRange(validTimeRange: TimeRange?)

Sets optional time range during which the complication has to be shown.

Public constructors

Builder

Added in 1.0.0
Builder(
    monochromaticImage: MonochromaticImage,
    contentDescription: ComplicationText
)
Parameters
monochromaticImage: MonochromaticImage

The MonochromaticImage to be displayed

contentDescription: ComplicationText

The content description field for accessibility and is used to describe what data the icon represents. If the icon is purely stylistic, and does not convey any information to the user, then provide an empty content description. If no content description is provided, a generic content description will be used instead. Please do not include the word 'complication' in the description.

Public functions

setTapAction

Added in 1.0.0
fun setTapAction(tapAction: PendingIntent?): MonochromaticImageComplicationData.Builder

Sets optional pending intent to be invoked when the complication is tapped.

setValidTimeRange

Added in 1.0.0
fun setValidTimeRange(validTimeRange: TimeRange?): MonochromaticImageComplicationData.Builder

Sets optional time range during which the complication has to be shown.