TimelineBuilders.Timeline

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

TimelineBuilders.Timeline.Builder

Builder for Timeline

Public methods

static @NonNull TimelineBuilders.Timeline.Builder

Returns a new Builder.

@NonNull List<@NonNull TimelineBuilders.TimelineEntry>

Gets the entries in a timeline.

Public methods

builder

@NonNull
public static TimelineBuilders.Timeline.Builder builder()

Returns a new Builder.

getTimelineEntries

@NonNull
public List<@NonNull TimelineBuilders.TimelineEntrygetTimelineEntries()

Gets the entries in a timeline. Intended for testing purposes only.