SlidingMenu icon indicating copy to clipboard operation
SlidingMenu copied to clipboard

Sliding Menu Locks Up Sometimes

Open hggz opened this issue 11 years ago • 6 comments

I haven't received an exception for this issue, however sometimes when the sliding menu is revealed through a swipe gesture, the sliding menu locks up. I can't interact with it or dismiss yet I can tap the elements in the fragment activity it's attached too.

I initialize the sliding menu in the onCreateView method like this:

menu = new SlidingMenu(this); menu.setMode(SlidingMenu.LEFT); menu.setShadowWidthRes(R.dimen.shadow_width); menu.setBehindOffsetRes(R.dimen.slidingmenu_offset); menu.setFadeDegree(0.35f); menu.attachToActivity(this, SlidingMenu.SLIDING_WINDOW); menu.setMenu(R.layout.menu_frame); getSupportFragmentManager() .beginTransaction() .replace(R.id.menu_frame, new MenuListFragment()) .commit();

any suggestions?

hggz avatar Aug 09 '14 18:08 hggz

Same problem here. It is very easy to reproduce. Just make the drawer swipe in and out, repeatedly and quickly and it will lock up immediately.

I am stucked with library in a project and regretting the decision to use it.

It locks up the entire activity but it does not block the UI thread. SO my activity can still update its views with a UI thread, but no Touch-events gets through to any Ui elements in the activity.

Any solution would be highly appreciated.

tannymanny avatar Sep 10 '14 05:09 tannymanny

Can you answer please jfeinstein10 ?????? Your library is destroying a project.

tannymanny avatar Sep 10 '14 14:09 tannymanny

It Works Well On My Machine.

slideMenu = new SlidingMenu(this);
slideMenu.setMode(SlidingMenu.RIGHT);
slideMenu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
slideMenu.setBehindOffsetRes(R.dimen.slide_menu_offset);
slideMenu.attachToActivity(this, SlidingMenu.SLIDING_CONTENT);
slideMenu.setMenu(R.layout.layout_slidemenu);

and then fill it with a fragment.

FragmentTransaction beginTransaction = getSupportFragmentManager().beginTransaction();
beginTransaction.replace(R.id.category_fragment_container, categoryFragment);
beginTransaction.add(R.id.menu_container, drawerMenuFragment).commit();

ChanningSun avatar Sep 10 '14 14:09 ChanningSun

Yeah but try clicking on the actionbar button repeatedly to invoke the swipe gesture. If you do 2 or three swipe gestures in a second, then the ntire screen freezes.

tannymanny avatar Sep 10 '14 15:09 tannymanny

try invoking the method:

SlidingFragmentActivity::toggle()

repeatedly through UI buttons and you will end up in a freeze scenario.

tannymanny avatar Sep 10 '14 15:09 tannymanny

I had similar issue, enabling hardwareAcceleration in manifest solved it.

arshadtehrani avatar Jun 06 '15 07:06 arshadtehrani