//workflow/com.squareup.workflow1.ui/ScreenViewFactoryFinder
ScreenViewFactoryFinder¶
[androidJvm] @WorkflowUiExperimentalApi()
interface ScreenViewFactoryFinder
ViewEnvironment service object used by Screen.toViewFactory to find the right ScreenViewFactory to build and manage a View to display Screens of the type of the receiver. The default implementation makes AndroidScreen work, and provides default bindings for NamedScreen, EnvironmentScreen, BackStackScreen, etc.
Here is how this hook could be used to provide a custom view to handle BackStackScreen:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|
Types¶
Name | Summary |
---|---|
Companion | [androidJvm] Content object Companion : ViewEnvironmentKey<ScreenViewFactoryFinder> |
Functions¶
Name | Summary |
---|---|
getViewFactoryForRendering | [androidJvm] Content open fun <ScreenT : Screen> getViewFactoryForRendering(environment: ViewEnvironment, rendering: ScreenT): ScreenViewFactory<ScreenT> |
Extensions¶
Name | Summary |
---|---|
withCompositionRoot | [androidJvm] Content @WorkflowUiExperimentalApi() fun ScreenViewFactoryFinder.withCompositionRoot(root: CompositionRoot): ScreenViewFactoryFinder More info Returns a ScreenViewFactoryFinder that ensures that any composeScreenViewFactory factories registered in this registry will be wrapped exactly once with a CompositionRoot wrapper. |