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.
Functions
Link copied to clipboard
Link copied to clipboard
Create a material theme that should be applied to all components.
Link copied to clipboard
Link copied to clipboard
override fun produceRequestedResources(resourceState: R, requestParams: RequestBuilders.ResourcesRequest): ResourceBuilders.Resources
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.
open fun ResourceBuilders.Resources.Builder.produceRequestedResources(resourceState: R, deviceParameters: DeviceParametersBuilders.DeviceParameters, resourceIds: List<String>)
Add resources directly to the builder.
Link copied to clipboard
abstract fun renderTile(state: T, deviceParameters: DeviceParametersBuilders.DeviceParameters): LayoutElementBuilders.LayoutElement
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.