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.
This question is now very old, but it has been built into Android now. So if people are searching and come across this post, hit up the Navigation Drawer section on the developer pages of Android.
http://developer.android.com/design/patterns/navigation-drawer.html
Use this one, it's good for you :
}
Try this
https://github.com/srikanthgr/FacebookSlideOutmenu
implement this in to your project, This is exactly what you want.
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:
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.
There is a branch for a right to left sliding menu of the jfeinstein's SlidingMenu original here: https://github.com/jfeinstein10/SlidingMenu/tree/slidingright
Alternatively, there is Simon's implementation which has simple configurations for making the switch from Left-to-Right and Right-to-Left here: https://github.com/SimonVT/android-menudrawer. There is a simple example on the page.
Although, I'm not one to publicly voice an opinion, I find Simon's library a tad easier to use. ;-)
That being said, I don't, however, take away absolutely any credit from jfeinstein either. His library powers one of my better selling apps. :-)