Skip to content

How to work with subcontainer navigation and Flow #6

Open

Description

@simekadam

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:)

Activity

  1. almozavr commented on Apr 29, 2015

    @almozavr
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions