androidslidingmenujfeinstein

SlidingMenu(jfeinstein). Disable secondary menu only


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);

Solution

  • 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);