ScreenViewHolder

Associates a view with a function (runner) that can update it to display instances of ScreenT. Also holds a reference to the ViewEnvironment that was most recently used to update the view.

Do not call runner directly. Use ScreenViewHolder.show instead. Or most commonly, allow WorkflowViewStub.show to call it for you.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The ViewEnvironment that was provided the last time view was updated by runner.

Link copied to clipboard

The function that is run by show to update view with a new Screen rendering and ViewEnvironment.

Link copied to clipboard

Returns the Screen most recently used to update the receiver's view via a call to show.

Link copied to clipboard
abstract val view: View

The View managed by this holder, and updated via runner

Functions

Link copied to clipboard

Returns true if screen is compatible with the Screen instance that was last shown by the view managed by the receiver.

Link copied to clipboard

Updates the view managed by the receiver to display screen, and updates the receiver's environment as well.

Link copied to clipboard
fun <ScreenT : Screen> ScreenViewHolder<ScreenT>.startShowing(initialRendering: ScreenT, initialEnvironment: ViewEnvironment, viewStarter: ViewStarter?)

It is rare to call this method directly. Instead the most common path is to pass Screen instances to WorkflowViewStub.show, which will apply the ScreenViewFactory and ScreenViewHolder machinery for you. See ScreenViewFactory for details.