bluelinelabs / bluelinelabs/Conductor
How to do complex master-detail layout?
- Dominant language
- Java
- Stars
- 3.9k
- Forks
- 338
- PR merge metrics
- No merged PRs in 30d
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)`
- `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?
Contributor guide
Research direction
Start by reviewing the sample layout and the HomeController setup with its appBarRouter, navDrawerRouter, and masterRouter child routers. Compare the phone and tablet configuration paths, including detailControllerA placement and state restoration; done means the correct portrait or landscape layout and navigation state survive configuration changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100