Skip to content

Test-drive workflow-kotlin in a fragment-based app? #271

Discussion options

You must be logged in to vote

From @rjrjr:

You might find the UI module’s new renderWorkflowIn overload to be just the thing here. It ties into the androidx ViewModel system for lifecycle and persistence, but doesn’t dictate anything else. You can use that and completely ignore WorkflowLayout, ViewEnvironment, etc.

Basically imitate HelloWorkflowFragment, but return your own view instance instead of ours.
https://github.com/square/workflow-kotlin/blob/v1.0.0-alpha.9/samples/hello-workfl[…]/squareup/sample/helloworkflowfragment/HelloWorkflowFragment.kt

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by lucamtudor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants