Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android slide menu that slide from both sides left and right

I'm trying to make sliding drawer menu like the one in the Facebook app. I navigated many questions like this amazing one here. and found a lot of libraries but all of them slide from left to right or from right to left in different one. I want to make it slide from both sides, left to right and right to left via two buttons in the top bar. Can any one help me with this.

Thanks in advance.

like image 584
M Hassen Avatar asked Feb 16 '13 09:02

M Hassen


1 Answers

this is the one I use and does exactly what you want:

SlidingMenu

You will have to implement the button feature yourself but it shouldn't be too hard!

EDIT:

An example:

SlidingMenu menuS = new SlidingMenu(this);
menuS.setMode(SlidingMenu.LEFT_RIGHT);
menuS.setMenu(R.layout.slideout_list);
menuS.setSecondaryMenu(R.layout.slideout_list2);

As the code shows you need to set the mode to LEFT_RIGHT and must specify a layout for both the left menu (setMenu()) and the right menu (setSecondaryMenu()) along with the other options specifying menu size and shadows etc.

like image 65
Koded101 Avatar answered Sep 20 '22 20:09

Koded101