public interface WindowRecomposerFactory
A factory for creating an Android window-scoped Recomposer. See createRecomposer.
Functions
createRecomposer
public 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.
Members
Companion
public companion object
Properties
LifecycleAware
public val LifecycleAware: WindowRecomposerFactory = WindowRecomposerFactory { rootView ->
rootView.createLifecycleAwareWindowRecomposer()
}
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.