从双方的Andr​​oid滑动滑动菜单左,右

问题描述:

我试图使滑动抽屉菜单像在Facebook应用程序。我驾驶的许多问题喜欢这个惊人的一个在这里。 并发现了很多的库,但所有这些滑动从左至右或从右至左的不同的一个。我希望把它从两侧滑动,左到右,右,通过在最上面一栏两个按钮离开。任何一个可以帮助我。

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.

在此先感谢。

这是一个我使用,不正是你想要的:

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!

编辑:

一个例子:

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

由于code说明你需要将模式设置为LEFT_RIGHT,必须为左侧菜单中指定布局(的SetMenu()),并在右侧的菜单(setSecondaryMenu())以及其他选项指定菜单大小和阴影等。

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.