SmallImageComplicationData.Builder

public final class SmallImageComplicationData.Builder


Builder for SmallImageComplicationData.

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

Summary

Public constructors

Builder(SmallImage smallImage, ComplicationText contentDescription)

Public methods

final @NonNull SmallImageComplicationData

Builds the MonochromaticImageComplicationData.

final @NonNull SmallImageComplicationData.Builder

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

final @NonNull SmallImageComplicationData.Builder
setValidTimeRange(TimeRange validTimeRange)

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

Public constructors

Builder

public final Builder(SmallImage smallImage, ComplicationText contentDescription)
Parameters
SmallImage smallImage

The SmallImage to be displayed

ComplicationText contentDescription

Localized description for use by screen readers

Public methods

setTapAction

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

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

setValidTimeRange

public final @NonNull SmallImageComplicationData.Builder setValidTimeRange(TimeRange validTimeRange)

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