MonochromaticImageComplicationData.Builder

public final class MonochromaticImageComplicationData.Builder


Builder for MonochromaticImageComplicationData.

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

Summary

Public constructors

Builder(
    MonochromaticImage monochromaticImage,
    ComplicationText contentDescription
)

Public methods

final @NonNull MonochromaticImageComplicationData

Builds the MonochromaticImageComplicationData.

final @NonNull MonochromaticImageComplicationData.Builder

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

final @NonNull MonochromaticImageComplicationData.Builder
setValidTimeRange(TimeRange validTimeRange)

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

Public constructors

Builder

public final Builder(
    MonochromaticImage monochromaticImage,
    ComplicationText contentDescription
)
Parameters
MonochromaticImage monochromaticImage

The MonochromaticImage to be displayed

ComplicationText contentDescription

Localized description for use by screen readers

Public methods

setTapAction

public final @NonNull MonochromaticImageComplicationData.Builder setTapAction(PendingIntent tapAction)

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

setValidTimeRange

public final @NonNull MonochromaticImageComplicationData.Builder