SingleTileLayoutRenderer

abstract class SingleTileLayoutRenderer<T, R>(val context: Context, val debugResourceMode: Boolean = false) : TileLayoutRenderer<T, R>

A TileLayoutRenderer designed with typical but restrictive limitations, such as a single tile in the timeline, and fixed resources that will be updated by changing ids instead of version.

Constructors

Link copied to clipboard
constructor(context: Context, debugResourceMode: Boolean = false)

Properties

Link copied to clipboard

The context to avoid passing in through each render method.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
open fun createTheme(): Colors

Create a material theme that should be applied to all components.

Link copied to clipboard
Link copied to clipboard

Produce resources for the given request. The implementation should read androidx.wear.tiles.RequestBuilders.ResourcesRequest.getResourceIds and if not empty only return the requested resources.

Add resources directly to the builder.

Link copied to clipboard

Render a single tile as a LayoutElement, that will be the only item in the timeline.

Link copied to clipboard
override fun renderTimeline(state: T, requestParams: RequestBuilders.TileRequest): TileBuilders.Tile

Produce a Timeline for the given tile request and the given state.