public final class

TimelineBuilders.Timeline

extends java.lang.Object

 java.lang.Object

↳androidx.wear.protolayout.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)

Creates a new wrapper instance from the proto.

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

Gets the entries in a timeline.

public TimelineProto.TimelinetoProto()

Returns the internal proto instance.

public java.lang.StringtoString()

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

Methods

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

Gets the entries in a timeline.

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

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

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

Creates a new wrapper instance from the proto.

public TimelineProto.Timeline toProto()

Returns the internal proto instance.

public java.lang.String toString()