TileBuilders.Tile.Builder

public static final class TileBuilders.Tile.Builder
extends Object

java.lang.Object
   ↳ androidx.wear.tiles.builders.TileBuilders.Tile.Builder


Builder for TileBuilders.Tile

Summary

Public methods

TileBuilders.Tile build()

Builds an instance from accumulated values.

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".

TileBuilders.Tile.Builder setResourcesVersion(String resourcesVersion)

Sets the resource version required for these tiles.

TileBuilders.Tile.Builder setTimeline(TimelineBuilders.Timeline timeline)

Sets the tiles to show in the carousel, along with their validity periods.

TileBuilders.Tile.Builder setTimeline(TimelineBuilders.Timeline.Builder timelineBuilder)

Sets the tiles to show in the carousel, along with their validity periods.

Inherited methods

Public methods

build

public TileBuilders.Tile build ()

Builds an instance from accumulated values.

Returns
TileBuilders.Tile

setFreshnessIntervalMillis

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 TileProviderService#getRequester).

Parameters
freshnessIntervalMillis long

Returns
TileBuilders.Tile.Builder

setResourcesVersion

public TileBuilders.Tile.Builder setResourcesVersion (String resourcesVersion)

Sets the resource version required for these tiles.

Parameters
resourcesVersion String

Returns
TileBuilders.Tile.Builder

setTimeline

public TileBuilders.Tile.Builder setTimeline (TimelineBuilders.Timeline timeline)

Sets the tiles to show in the carousel, along with their validity periods.

Parameters
timeline TimelineBuilders.Timeline

Returns
TileBuilders.Tile.Builder

setTimeline

public TileBuilders.Tile.Builder setTimeline (TimelineBuilders.Timeline.Builder timelineBuilder)

Sets the tiles to show in the carousel, along with their validity periods.

Parameters
timelineBuilder TimelineBuilders.Timeline.Builder

Returns
TileBuilders.Tile.Builder