TileLayoutRenderer

interface TileLayoutRenderer<T, R>

A base class for a synchronous tile and resource render phase.

It assumes all async suspending work is done by the TileService, and given a single representation of the state, creates a 100% reproducible tile and resources.

This is designed to allow precise fast Android Studio previews as well as screenshot tests.

Inheritors

Functions

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.

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

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