Google is committed to advancing racial equity for Black communities. See how.

RenderParameters

class RenderParameters
kotlin.Any
   ↳ androidx.wear.watchface.RenderParameters

Used to parameterize watch face rendering.

Summary

Public constructors
<init>(wireFormat: RenderParametersWireFormat)

<init>(drawMode: DrawMode, layerParameters: Map<Layer, LayerMode>, highlightedComplicationId: Int?)

Used to parameterize watch face rendering.

Public methods
RenderParametersWireFormat

Properties
DrawMode

The overall drawing parameters based on system state.

Int?

Optional parameter which non null specifies that a particular complication, rather than all complications, should be highlighted when Layer.COMPLICATIONS is LayerMode.DRAW_HIGHLIGHTED.

Map<Layer, LayerMode>

Parameters for rendering individual layers.

Companion properties
RenderParameters

Default RenderParameters which draws everything in interactive mode.

Map<Layer, LayerMode>

A layerParameters map where all Layers have LayerMode.DRAW.

Public constructors

<init>

RenderParameters(wireFormat: RenderParametersWireFormat)

<init>

RenderParameters(
    drawMode: DrawMode,
    layerParameters: Map<Layer, LayerMode>,
    highlightedComplicationId: Int?)

Used to parameterize watch face rendering.

Public methods

toWireFormat

fun toWireFormat(): RenderParametersWireFormat

Properties

drawMode

val drawMode: DrawMode

The overall drawing parameters based on system state.

highlightedComplicationId

val highlightedComplicationId: Int?

Optional parameter which non null specifies that a particular complication, rather than all complications, should be highlighted when Layer.COMPLICATIONS is LayerMode.DRAW_HIGHLIGHTED.

layerParameters

val layerParameters: Map<Layer, LayerMode>

Parameters for rendering individual layers. Generally these will all be LayerMode#DRAW in normal operation, but the editor may make more complicated requests which need to be honored to function properly.

Companion properties

DEFAULT_INTERACTIVE

val DEFAULT_INTERACTIVE: RenderParameters

Default RenderParameters which draws everything in interactive mode.

DRAW_ALL_LAYERS

val DRAW_ALL_LAYERS: Map<Layer, LayerMode>

A layerParameters map where all Layers have LayerMode.DRAW.