Android 12 Developer Preview is here! Try it out, and give us your feedback!

Builder

class Builder
kotlin.Any
   ↳ androidx.wear.complications.data.MonochromaticImageComplicationData.Builder

Builder for MonochromaticImageComplicationData.

You must at a minimum set the monochromaticImage field.

Summary

Public constructors
<init>(monochromaticImage: MonochromaticImage)

Builder for MonochromaticImageComplicationData.

Public methods
MonochromaticImageComplicationData

Builds the MonochromaticImageComplicationData.

MonochromaticImageComplicationData.Builder

Sets optional content description associated with the complication data.

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

<init>

Builder(monochromaticImage: MonochromaticImage)

Builder for MonochromaticImageComplicationData.

You must at a minimum set the monochromaticImage field.

Public methods

setContentDescription

fun setContentDescription(contentDescription: ComplicationText?): MonochromaticImageComplicationData.Builder

Sets optional content description associated with the complication data.

setTapAction

fun setTapAction(tapAction: PendingIntent?): MonochromaticImageComplicationData.Builder

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

setValidTimeRange

fun setValidTimeRange(validTimeRange: TimeRange?): MonochromaticImageComplicationData.Builder

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