TypedComplicationTemplate

abstract class TypedComplicationTemplate<T>(val context: Context) : ComplicationTemplate<T>

A complication provider that support distinct render methods.

Constructors

Link copied to clipboard
constructor(context: Context)

Properties

Link copied to clipboard
open override val context: Context

Functions

Link copied to clipboard
Link copied to clipboard
fun ComplicationTemplate<*>.longText(icon: Icon?, type: SmallImageType = SmallImageType.PHOTO, title: String?, text: String, launchIntent: PendingIntent?, contentDescription: ComplicationText? = null): LongTextComplicationData
Link copied to clipboard
fun ComplicationTemplate<*>.photoImage(photoImage: Icon, name: String, launchIntent: PendingIntent?, contentDescription: ComplicationText? = null): PhotoImageComplicationData
Link copied to clipboard
abstract fun previewData(): T
Link copied to clipboard
Link copied to clipboard
override fun render(type: ComplicationType, data: T): ComplicationData
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun ComplicationTemplate<*>.shortText(title: String?, text: String, @DrawableRes icon: Int?, launchIntent: PendingIntent?, contentDescription: ComplicationText? = null): ShortTextComplicationData
Link copied to clipboard
fun ComplicationTemplate<*>.smallImage(icon: Icon, type: SmallImageType = SmallImageType.PHOTO, name: String, launchIntent: PendingIntent?, contentDescription: ComplicationText? = null): SmallImageComplicationData
Link copied to clipboard
open override fun supportedTypes(): List<ComplicationType>
Link copied to clipboard