LongTextComplicationData.Builder


class LongTextComplicationData.Builder


Builder for LongTextComplicationData.

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

Summary

Public constructors

Builder(text: ComplicationText, contentDescription: ComplicationText)

Public functions

open LongTextComplicationData

Builds the LongTextComplicationData.

LongTextComplicationData.Builder

Sets optional image associated with the complication data.

LongTextComplicationData.Builder
setSmallImage(smallImage: SmallImage?)

Sets optional image associated with the complication data.

LongTextComplicationData.Builder

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

LongTextComplicationData.Builder

Sets optional title associated with the complication data.

LongTextComplicationData.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(text: ComplicationText, contentDescription: ComplicationText)
Parameters
text: ComplicationText

Localized main ComplicationText to display within the complication. There isn't an explicit character limit but text may be truncated if too long

contentDescription: ComplicationText

Defines localized text that briefly describes content of the complication. This property is used primarily for accessibility. Since some complications do not have textual representation this attribute can be used for providing such. Please do not include the word 'complication' in the description.

Public functions

build

Added in 1.0.0
open fun build(): LongTextComplicationData

Builds the LongTextComplicationData.

setMonochromaticImage

Added in 1.0.0
fun setMonochromaticImage(icon: MonochromaticImage?): LongTextComplicationData.Builder

Sets optional image associated with the complication data.

setSmallImage

Added in 1.0.0
fun setSmallImage(smallImage: SmallImage?): LongTextComplicationData.Builder

Sets optional image associated with the complication data.

setTapAction

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

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

setTitle

Added in 1.0.0
fun setTitle(title: ComplicationText?): LongTextComplicationData.Builder

Sets optional title associated with the complication data.

setValidTimeRange

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

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