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

Composition

interface Composition
androidx.compose.runtime.Composition

A composition object is usually constructed for you, and returned from an API that is used to initially compose a UI. For instance, setContent returns a Composition.

The dispose method should be used when you would like to dispose of the UI and the Composition.

Summary

Public methods
abstract Unit

Clear the hierarchy that was created from the composition.

abstract Unit
setContent(content: () -> Unit)

Update the composition with the content described by the content composable

Public methods

dispose

abstract fun dispose(): Unit

Clear the hierarchy that was created from the composition.

setContent

abstract fun setContent(content: () -> Unit): Unit

Update the composition with the content described by the content composable

Parameters
content: () -> Unit A composable function that describes the UI