Responsive UI portrait to landscape switch with menu open #447

Open
egfconnor opened this Issue Jun 5, 2013 · 7 comments

Projects

None yet

1 participant

@egfconnor

When using a Nexus 7 with the sample app and my app which is very similar to the code in your sample, I noticed that when having the sliding menu open in portrait mode and then switching to landscape it will leave a blank area on the screen and won't properly use screen real estate.

To reproduce: install sample app on Nexus 7 and launch the Responsive UI activity. Slide out the menu while in portrait and then turn device into landscape.

@egfconnor

To clarify, you are leaving the sliding menu open while it rotates to landscape, correct? A fresh install of ABS, SlidingMenu, and the example app and it does it for me. Building against API 17.

@ghost
ghost commented Jun 6, 2013

I've posted this same bug quite a while ago, and it was closed by the project owner without any comment.
This happens when you force the two panel view in landscape mode on a phone, so you have the slidemenu in portrait and the two panel in landscape?. I think the original sample only shows the two panel view on large (tablet) screens.
See this #365

@egfconnor

Yes I currently use the single panel on phones and then on smaller tablets it will do two pane in landscape and slidemenu in portrait. On a Nexus 10 I use the two panel view on both orientations.

@egfconnor

I added your bit of code in SlidingActivityHelper.java:
if ((open) && (mSlidingMenu.isSlidingEnabled())) {
if (secondary) {
mSlidingMenu.showSecondaryMenu(false);
} else {
mSlidingMenu.showMenu(false);
}
} else {
mSlidingMenu.showContent(false);
}

and it fixed the issue. Should probably be added to the library, can't see any reason you wouldn't want to check if the menu is open and sliding is enabled before you show the menu?

@ghost
ghost commented Jun 6, 2013

Yes, I think it should, if not there somewhere else.
I think the bug is a fact, or else I really don't get what is wrong in my layout.

@egfconnor

Agreed. I think this is a logical bug fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment