{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

WindowRecomposerFactory.Companion

public static class WindowRecomposerFactory.Companion


Summary

Public methods

static final @NonNull WindowRecomposerFactory

A WindowRecomposerFactory that creates lifecycle-aware Recomposers.

Public methods

getLifecycleAware

public static final @NonNull WindowRecomposerFactory getLifecycleAware()

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.