leodeleon
02/16/2020, 9:06 AMBackstackScreen
)
Is there a way to abstract this concept when modelling the renderings. When do I know I can/need to create a different screen rendering type, and how should I go about it in a way that exposes itself to Android later? Examples are PanelContainerScreen
and ScrimContainerScreen
.
https://github.com/square/workflow/tree/4172907790c30385c8b57b5f3009351ff4d50cc8/kotlin/samples/containers/common/src/main/java/com/squareup/sample/container/panel
In other words, how should one model rendering types and how to make sense of it in the context of a workflow?Zach Klippenstein (he/him) [MOD]
02/16/2020, 7:05 PMLayoutRunner
per logical screen. But that's just a convention and a starting point.
If a screen is really complex, sometimes it helps to factor parts into child workflows with their own `LayoutRunner`s. Eg if you have some data entry form component that has validation logic and is used in different parts of your app, it might make sense to give that form its own `LayoutRunner`+`Workflow`+`Rendering`, and then any workflow that needs to use it just renders the workflow, puts the child rendering in its own rendering, and uses WorkflowViewStub
to display the rendering.