WindowRecomposerFactory


A factory for creating an Android window-scoped Recomposer. See createRecomposer.

Summary

Public companion properties

WindowRecomposerFactory

A WindowRecomposerFactory that creates lifecycle-aware Recomposers.

android

Public functions

Recomposer
createRecomposer(windowRootView: View)

Get a Recomposer for the window where windowRootView is at the root of the window's View hierarchy.

android

Public companion properties

LifecycleAware

val LifecycleAwareWindowRecomposerFactory

A WindowRecomposerFactory that creates lifecycle-aware Recomposers.

Returned Recomposers will be bound to the LifecycleOwner returned by findViewTreeLifecycleOwner 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.

Public functions

createRecomposer

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.