Pregunta

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);
¿Fue útil?

Solución

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

Otros consejos

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top