The example in the sample doesn't correctly survive configuration changes (you can get the portrait layout in landscape sometimes)

How should I be doing this? I've attempted to achieve this, but I am currently having issues restoring state.
I currently have the whole layout wrapped in a single HomeController, which has three childRouters via homeController.getChildRouter(view, TAG)
appBarRouter
navDrawerRouter
masterRouter (represents the current nav drawer selection)
masterRouter's root is masterControllerA (or masterControllerB when toggled by nav drawer). detailControllerA's is either:
- pushed onto the
masterRouter (in phone config, for single pane layout)
- the root of the childRouter of its
masterController (in tablet config, for two pane layout)
To avoid instantiating unnecessary controllers I'm always checking if the router/controller is already contained in the existing ViewGroup container/router by its tag.
Does any of this throw a red flag?
The example in the sample doesn't correctly survive configuration changes (you can get the portrait layout in landscape sometimes)
How should I be doing this? I've attempted to achieve this, but I am currently having issues restoring state.
I currently have the whole layout wrapped in a single
HomeController, which has threechildRoutersviahomeController.getChildRouter(view, TAG)appBarRouternavDrawerRoutermasterRouter(represents the current nav drawer selection)masterRouter's root ismasterControllerA(ormasterControllerBwhen toggled by nav drawer).detailControllerA's is either:masterRouter(in phone config, for single pane layout)masterController(in tablet config, for two pane layout)To avoid instantiating unnecessary controllers I'm always checking if the
router/controlleris already contained in the existingViewGroup container/routerby itstag.Does any of this throw a red flag?