compose

Function

Android
@ExperimentalGlanceWearTilesApi

suspend fun compose(
    context: Context,
    size: DpSize,
    state: Any? = null,
    content: @Composable () -> Unit
): WearTilesCompositionResult

Triggers the composition of content and returns the result.

Parameters

contextThe Context to get the resources during glance ui building.
stateLocal view state that can be passed to composition through LocalState.
sizeSize of the glance ui to be displayed at.
contentDefinition of the UI.

Returns

Composition result containing the glance ui.