Skip to content

//workflow/com.squareup.workflow1.ui.androidx/WorkflowAndroidXSupport

WorkflowAndroidXSupport

[androidJvm] object WorkflowAndroidXSupport

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

Functions

Name Summary
lifecycleOwnerFromViewTreeOrContext [androidJvm]
Content
@WorkflowUiExperimentalApi()

fun lifecycleOwnerFromViewTreeOrContext(view: View): LifecycleOwner?
More info
Tries to get the parent lifecycle from the current view via ViewTreeLifecycleOwner, if that fails it looks up the context chain for a LifecycleOwner, and if that fails it just returns null.


stateRegistryOwnerFromViewTreeOrContext [androidJvm]
Content
@WorkflowUiExperimentalApi()

fun stateRegistryOwnerFromViewTreeOrContext(view: View): SavedStateRegistryOwner?
More info
Tries to get the parent SavedStateRegistryOwner from the current view via ViewTreeSavedStateRegistryOwner, if that fails it looks up the context chain for a registry owner, and if that fails it just returns null.