Skip to content

//workflow/com.squareup.workflow1.ui/WorkflowViewStub/update

update

[androidJvm]
Content
fun update(rendering: Any, viewEnvironment: ViewEnvironment): View
More info

Replaces this view with one that can display rendering. If the receiver has already been replaced, updates the replacement if it canShowRendering. If the current replacement can’t handle rendering, a new view is put in its place.

The id of any view created by this method will be set to to inflatedId, unless that value is View.NO_ID.

The background of any view created by this method will be copied from getBackground, if that value is non-null.

If updatesVisibility is true, the visibility of any view created by this method will be copied from actual. (Bear in mind that the initial value of actual is this stub.)

Return

the view that showed rendering

Throws

kotlin.IllegalArgumentException

if no binding can be find for the type of rendering

kotlin.IllegalStateException

if the matching ViewFactory fails to call View.bindShowRendering when constructing the view