TimelineBuilders.Timeline


@RequiresSchemaVersion(major = 1, minor = 0)
class TimelineBuilders.Timeline


A collection of TimelineEntry items.

TimelineEntry items can be used to update a layout on-screen at known times, without having to explicitly update a layout. This allows for cases where, say, a calendar can be used to show the next event, and automatically switch to showing the next event when one has passed.

The active TimelineEntry is switched, at most, once a minute. In the case where the validity periods of TimelineEntry items overlap, the item with the shortest* validity period will be shown. This allows a layout provider to show a "default" layout, and override it at set points without having to explicitly insert the default layout between the "override" layout.

Summary

Nested types

Builder for Timeline

Public functions

java-static TimelineBuilders.Timeline

Returns the Timeline object containing the given layout element.

(Mutable)List<TimelineBuilders.TimelineEntry!>

Gets the entries in a timeline.

String

Public functions

fromLayoutElement

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
java-static fun fromLayoutElement(layoutElement: LayoutElementBuilders.LayoutElement): TimelineBuilders.Timeline

Returns the Timeline object containing the given layout element.

getTimelineEntries

Added in 1.0.0
fun getTimelineEntries(): (Mutable)List<TimelineBuilders.TimelineEntry!>

Gets the entries in a timeline.

toString

fun toString(): String