5

Is there documentation on how to construct sub containers within flow?

For example, I have a Master, a Detail view.

I intend to add a popup view which will have it's own backstack. The popup will function as a wizard asking the user to complete some setup instruction and gets displayed as a popup.

Something like the layout below except there is a master container as well (fully displayed drawer layout)

enter image description here

How can this be achieved? Will the detail (or parent) container need to know about the existence of the popup container? Some thing like this?

@InjectView(R.id.master_container)
FramePathContainerView masterContainer;

@InjectView(R.id.detail_container)
FramePathContainerView detailContainer;

@InjectView(R.id.popup_container)
FramePathContainerView popupContainer;

@Override
public boolean onBackPressed() {
    return BackSupport.onBackPressed(popupContainer) 
            || BackSupport.onBackPressed(detailContainer);
}

@Override
public ViewGroup getCurrentChild() {
    Paths.MasterDetailPath showing = Path.get(getContext());
    return showing.isMaster() ? masterContainer.getCurrentChild()
            : showing.isPopup() ? popupContainer.getCurrentChild() 
            : detailContainer.getCurrentChild();
}

Is that what's supposed to be done? Thoughts?

redDragonzz
  • 1,543
  • 2
  • 15
  • 33

0 Answers0