WorkflowAndroidXSupport

Namespace for some helper functions for interacting with the AndroidX libraries.

Functions

Tries to get the parent lifecycle from the current view via findViewTreeLifecycleOwner, if that fails it looks up the context chain for a LifecycleOwner, and if that fails it just returns null. This differs from findViewTreeLifecycleOwner because it will check the View.getContext if no owner is found in the view tree.

Link copied to clipboard

Looks for an OnBackPressedDispatcherOwner in the receiving ViewEnvironment. Failing that, falls through to View.onBackPressedDispatcherOwnerOrNull. Patterned after the heuristic in Compose's LocalOnBackPressedDispatcherOwner.

Link copied to clipboard

Tries to get the parent SavedStateRegistryOwner from the current view via findViewTreeSavedStateRegistryOwner, if that fails it looks up the context chain for a registry owner, and if that fails it just returns null. This differs from findViewTreeSavedStateRegistryOwner because it will check the View.getContext if no owner is found in the view tree.