-
Notifications
You must be signed in to change notification settings - Fork 338
Open
Description
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)
appBarRouternavDrawerRoutermasterRouter(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?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
