SlidingMenu(jfeinstein). Disable secondary menu only

880 views Asked by At

Is it possible to disable only secondary Menu in SlidingMenu lib?

When I use this:

mSlidingMenu.setTouchModeAbove(SlidingMenu.TOUCHMODE_NONE);

it disables both menus.

Update:

mSlidingMenu = new SlidingMenu(this);
mSlidingMenu.setMenu(R.layout.sliding_menu_left);
mSlidingMenu.setSecondaryMenu(R.layout.sliding_menu_right);
2

There are 2 answers

0
cpalasanu On BEST ANSWER

I don't know if this is the best solution but it works for me.

sm.setMode(SlidingMenu.LEFT_RIGHT);
setupRightMenu();
sm.setMode(SlidingMenu.LEFT);

// to enable right menu
sm.setMode(SlidingMenu.LEFT_RIGHT);

// to disable right menu
sm.setMode(SlidingMenu.LEFT);
0
Tobliug On

I cannot comment on cpalasanu response so I create a new response :

Changing the mode works in some case because in this configuration you just overlay the right panel with the left panel when you set : sm.setMode(SlidingMenu.LEFT);