WindowRecomposerFactory
interface WindowRecomposerFactory
androidx.compose.ui.platform.WindowRecomposerFactory |
Summary
Public methods | |
---|---|
abstract Recomposer |
createRecomposer(windowRootView: View) Get a Recomposer for the window where windowRootView is at the root of the window's View hierarchy. |
Companion properties | |
---|---|
WindowRecomposerFactory |
A WindowRecomposerFactory that creates lifecycle-aware Recomposers. |
Public methods
createRecomposer
abstract fun createRecomposer(windowRootView: View): Recomposer
Get a Recomposer for the window where windowRootView is at the root of the window's View hierarchy. The factory is responsible for establishing a policy for shutting down the returned Recomposer. windowRootView will hold a hard reference to the returned Recomposer until it joins after shutting down.
Companion properties
LifecycleAware
val LifecycleAware: WindowRecomposerFactory
A WindowRecomposerFactory that creates lifecycle-aware Recomposers.
Returned Recomposers will be bound to the ViewTreeLifecycleOwner registered at the root of the view hierarchy and run recomposition and composition effects on the AndroidUiDispatcher.CurrentThread for the window's UI thread. The associated MonotonicFrameClock will only produce frames when the Lifecycle is at least Lifecycle.State.STARTED, causing animations and other uses of MonotonicFrameClock APIs to suspend until a visible frame will be produced.