Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to work with subcontainer navigation and Flow #6

Open
simekadam opened this issue Apr 22, 2015 · 1 comment
Open

How to work with subcontainer navigation and Flow #6

simekadam opened this issue Apr 22, 2015 · 1 comment

Comments

@simekadam
Copy link

Hi, I'm struggling with Flow, I just can't get how to use subcontainers and how to have Flow backed navigation within them.
Imagine a Screen with some subcontainer which can change its content as the user clicks a button. I'd like to keep this in my Flow backstack.
That means I either need to somehow switch Flow.Dispatchers for my existing Flow instance, or that I need to create a separate instance just for the subcontainer (with separated backstack).
Neither of these solutions sounds good for me, so I'm asking if you know better:)

@almozavr
Copy link
Contributor

This is interesting, we haven't implemented such things yet, but as I understand, you want to get something similar to child fragment feature, right? If so, there is a question: do you need to link some subcontainer screens with main paths? If so, you have to share Flow and it's History (formerly Backstack) instance and move switching logic into PathContainer. Maybe, somehow, your subcontainer's paths could have a sign of their parent container, so dispatcher could now where to pass the controls.
Otherwise, if you want subcontainers history detached from main's Flow instance, I see a possible solution in creating another Flow instance and attaching it to subcontainer's parent view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants