//workflow/com.squareup.workflow1.ui/buildView
buildView¶
[androidJvm]
Content
@WorkflowUiExperimentalApi()
fun <RenderingT : Any> ViewRegistry.buildView(initialRendering: RenderingT, initialViewEnvironment: ViewEnvironment, contextForNewView: Context, container: ViewGroup? = null, viewStarter: ViewStarter? = null): View
More info
This will be deprecated in favor of ScreenViewFactory.startShowing very soon.
It is usually more convenient to use WorkflowViewStub or DecorativeViewFactory than to call this method directly.
Finds a ViewFactory to create a View ready to display initialRendering. The caller is responsible for calling View.start on the new View. After that, View.showRendering can be used to update it with new renderings that are compatible with initialRendering.
Parameters¶
androidJvm
viewStarter | An optional wrapper for the function invoked when View.start is called, allowing for last second initialization of a newly built View. See ViewStarter for details. |
Throws¶
java.lang.IllegalArgumentException | if no factory can be found for type RenderingT |
java.lang.IllegalStateException | if the matching ViewFactory fails to call View.bindShowRendering when constructing the view |