class ComplicationDataTimeline


A collection of TimelineEntry items.

This allows a sequence of ComplicationData to be delivered to the watch face which can be cached and updated automatically. E.g. today's weather forecast at various times or multiple upcoming calendar events.

In the case where the validity periods of TimelineEntry items overlap, the item with the shortest validity period will be shown. If none are valid then the defaultComplicationData will be shown. This allows a complication datasource to show a "default", and override it at set points without having to explicitly insert the default ComplicationData between the each "override".

The complication to render from a timeline is selected each time the watch face is rendered, however the presence of a timeline does not trigger any extra frames to be rendered. Most watch faces render at least once per minute at the top of the minute so complication updates should be timely.

Note older watch faces only support defaultComplicationData, and v1.1 of wear-watchface is required to support timelineEntries.

Summary

Public constructors

ComplicationDataTimeline(
    defaultComplicationData: ComplicationData,
    timelineEntries: Collection<TimelineEntry>
)

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

ComplicationData

The default ComplicationData to be displayed

Collection<TimelineEntry>

A collection of "overrides" to be displayed at certain times

Public constructors

ComplicationDataTimeline

Added in 1.1.0
ComplicationDataTimeline(
    defaultComplicationData: ComplicationData,
    timelineEntries: Collection<TimelineEntry>
)
Parameters
defaultComplicationData: ComplicationData

The default ComplicationData to be displayed

timelineEntries: Collection<TimelineEntry>

A collection of "overrides" to be displayed at certain times

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

defaultComplicationData

Added in 1.1.0
val defaultComplicationDataComplicationData

The default ComplicationData to be displayed

timelineEntries

Added in 1.1.0
val timelineEntriesCollection<TimelineEntry>

A collection of "overrides" to be displayed at certain times