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(
    @NonNull MonochromaticImage monochromaticImage,
    @NonNull 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

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

Public constructors

Builder

public final Builder(
    @NonNull MonochromaticImage monochromaticImage,
    @NonNull ComplicationText contentDescription
)

Public methods

setTapAction

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

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

setValidTimeRange

@NonNull
public final MonochromaticImageComplicationData.Builder setValidTimeRange(@Nullable TimeRange validTimeRange)

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