public final class

TimelineBuilders.Timeline

extends java.lang.Object

 java.lang.Object

↳androidx.wear.tiles.TimelineBuilders.Timeline

Overview

A collection of TimelineBuilders.TimelineEntry items.

TimelineBuilders.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 TimelineBuilders.TimelineEntry is switched, at most, once a minute. In the case where the validity periods of TimelineBuilders.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

Methods
public static TimelineBuilders.TimelinefromLayoutElement(LayoutElementBuilders.LayoutElement layoutElement)

Returns the TimelineBuilders.Timeline object containing the given layout element.

public static TimelineBuilders.TimelinefromProto(TimelineProto.Timeline proto)

public java.util.List<TimelineBuilders.TimelineEntry>getTimelineEntries()

Gets the entries in a timeline.

public TimelineProto.TimelinetoProto()

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods

public java.util.List<TimelineBuilders.TimelineEntry> getTimelineEntries()

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

public static TimelineBuilders.Timeline fromProto(TimelineProto.Timeline proto)

public static TimelineBuilders.Timeline fromLayoutElement(LayoutElementBuilders.LayoutElement layoutElement)

Returns the TimelineBuilders.Timeline object containing the given layout element.

public TimelineProto.Timeline toProto()