Package-level declarations
Types
Interface implemented by a Screen rendering class to minimize the boilerplate required for it to drive an Android UI via an appropriate ScreenViewFactory implementation.
Parcelable implementation of TextController.
A ViewRegistry.Entry that can build Android View instances, along with functions that can update them to display Screen renderings of a particular type, bundled together in instances of ScreenViewHolder.
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.
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.
The function that updates a View instance built by a ScreenViewFactory. Each ScreenViewRunner instance is paired with a single View instance, its neighbor in a ScreenViewHolder.
A wrapper for the function invoked when ScreenViewHolder.startShowing is called, allowing for custom initialization of a newly built View before or after the first call to ScreenViewHolder.show. Most typical use is to call WorkflowLifecycleOwner.installOn), at just the right moment.
A placeholder View that can replace itself with ones driven by workflow renderings, similar to android.view.ViewStub.
Properties
Returns the most recent ViewEnvironment applied to this view, or null if the receiver was not initialized via ScreenViewHolder.startShowing.
Returns the most recent Screen rendering shown in this view, or throws a NullPointerException if the receiver was not created via ScreenViewFactory.startShowing.
Returns the most recent Screen rendering shown in this view, or null
if the receiver was not initialized via ScreenViewHolder.startShowing.
Functions
Returns true if screen is compatible with the Screen instance that was last shown by the view managed by the receiver.
Call this from your view code's showRendering
method. This method is idempotent: if it has already been called with a particular EditText, and the view has not been detached since the last call, it will do nothing. If a different TextController's control is called on the same EditText, the old one will be disconnected and the new one will replace it.
Transforms a ScreenViewFactory of TransformedT into one that can handle instances of SourceT.
An Android ViewModel
-friendly wrapper for com.squareup.workflow1.renderWorkflowIn, for use with a workflow that takes no input (that is, has PropsT
set to Unit).
An Android ViewModel
-friendly wrapper for com.squareup.workflow1.renderWorkflowIn, for use with a workflow that requires one input value (prop) to run.
An Android ViewModel
-friendly wrapper for com.squareup.workflow1.renderWorkflowIn, for use with a workflow that requires input (props) to run.
Updates the view managed by the receiver to display screen, and updates the receiver's environment as well.
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.
Convenience that combines ScreenViewFactory.buildView and ScreenViewHolder.startShowing, since we rarely need to do work between those two calls.
Wraps receiver in a Snapshot suitable for use with com.squareup.workflow1.StatefulWorkflow. Intended to allow use of @Parcelize
.
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, ScreenViewHolder, and ScreenViewFactoryFinder machinery for you.