jfeinstein10 / SlidingMenu

An Android library that allows you to easily create applications with slide-in menus. You may use it in your Android apps provided that you cite this project and include the license in your app. Thanks!
Apache License 2.0
11.08k stars 5.05k forks source link

Add second sliding menu #651

Open darkovski88 opened 10 years ago

darkovski88 commented 10 years ago

Hello guys, first of all @jfeinstein10 thanks for the amazing library I use it in every project that requires this feature.

Now my problem is that I want to add a secondary menu in my app - I have added one on the left, now I want to add another on the right. The right menu should be independed from the left - it should have different items etc.. So is this possible with this library? If so can someone explain me or give me a tutorial on how can I do this?

Regards, Darko

ghost commented 10 years ago

You can achieve this with this;

getSlidingMenu().setSecondaryMenu(R.layout.menu_frame_two); getSlidingMenu().setSecondaryShadowDrawable(R.drawable.shadowright); getSupportFragmentManager() .beginTransaction() .replace(R.id.menu_frame_two, new SampleListFragment()) .commit();

Also, it is available in the example project

Mansoor17 commented 9 years ago

But first of all you should set mode left_right like that, getSlidingMenu().setMode(SlidingMenu.LEFT_RIGHT); that will show a right menu for you. now add your items or list like left side.