TimelineBuilders.Timeline


@RequiresSchemaVersion(major = 1, minor = 0)
public final 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 methods

static @NonNull TimelineBuilders.Timeline
@RequiresSchemaVersion(major = 1, minor = 0)
fromLayoutElement(
    @NonNull LayoutElementBuilders.LayoutElement layoutElement
)

Returns the Timeline object containing the given layout element.

@NonNull List<TimelineBuilders.TimelineEntry>

Gets the entries in a timeline.

@NonNull String

Public methods

fromLayoutElement

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
public static @NonNull TimelineBuilders.Timeline fromLayoutElement(
    @NonNull LayoutElementBuilders.LayoutElement layoutElement
)

Returns the Timeline object containing the given layout element.

getTimelineEntries

Added in 1.0.0
public @NonNull List<TimelineBuilders.TimelineEntrygetTimelineEntries()

Gets the entries in a timeline.

toString

public @NonNull String toString()