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 |
|---|
public final class TimelineBuilders.Timeline.BuilderBuilder for |
Public methods |
|
|---|---|
static @NonNull TimelineBuilders.Timeline |
@RequiresSchemaVersion(major = 1, minor = 0)Returns the |
@NonNull List<TimelineBuilders.TimelineEntry> |
Gets the entries in a timeline. |
@NonNull String |
toString() |
Public methods
fromLayoutElement
@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
public @NonNull List<TimelineBuilders.TimelineEntry> getTimelineEntries()
Gets the entries in a timeline.