public final class

TileBuilders.Tile.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.wear.tiles.TileBuilders.Tile.Builder

Overview

Builder for TileBuilders.Tile

Summary

Constructors
publicBuilder()

Creates an instance of TileBuilders.Tile.Builder.

Methods
public TileBuilders.Tilebuild()

Builds an instance from accumulated values.

public TileBuilders.Tile.BuildersetFreshnessIntervalMillis(long freshnessIntervalMillis)

Sets how many milliseconds of elapsed time (**not** wall clock time) this tile can be considered to be "fresh".

public TileBuilders.Tile.BuildersetResourcesVersion(java.lang.String resourcesVersion)

Sets the resource version required for these tiles.

public TileBuilders.Tile.BuildersetState(StateBuilders.State state)

Sets StateBuilders.State for this tile.

public TileBuilders.Tile.BuildersetTileTimeline(TimelineBuilders.Timeline tileTimeline)

Sets the TimelineBuilders.Timeline containing the layouts for the tiles to show in the carousel, along with their validity periods.

public TileBuilders.Tile.BuildersetTimeline(TimelineBuilders.Timeline timeline)

Sets the TimelineBuilders.Timeline containing the layouts for the tiles to show in the carousel, along with their validity periods.

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

Constructors

public Builder()

Creates an instance of TileBuilders.Tile.Builder.

Methods

public TileBuilders.Tile.Builder setResourcesVersion(java.lang.String resourcesVersion)

Sets the resource version required for these tiles. This can be any developer-defined string; it is only used to cache resources, and is passed in RequestBuilders.ResourcesRequest if the system does not have a copy of the specified resource version.

public TileBuilders.Tile.Builder setTileTimeline(TimelineBuilders.Timeline tileTimeline)

Sets the TimelineBuilders.Timeline containing the layouts for the tiles to show in the carousel, along with their validity periods.

public TileBuilders.Tile.Builder setFreshnessIntervalMillis(long freshnessIntervalMillis)

Sets how many milliseconds of elapsed time (**not** wall clock time) this tile can be considered to be "fresh". The platform will attempt to refresh your tile at some point in the future after this interval has lapsed. A value of 0 here signifies that auto-refreshes should not be used (i.e. you will manually request updates via TileService#getRequester).

This mechanism should not be used to update your tile more frequently than once a minute, and the system may throttle your updates if you request updates faster than this interval. This interval is also inexact; the system will generally update your tile if it is on-screen, or about to be on-screen, although this is not guaranteed due to system-level optimizations.

Sets StateBuilders.State for this tile.

Deprecated: Use TileBuilders.Tile.Builder instead.

Sets the TimelineBuilders.Timeline containing the layouts for the tiles to show in the carousel, along with their validity periods.

public TileBuilders.Tile build()

Builds an instance from accumulated values.