Open alawibh opened 11 years ago
When you extend from SlidingActivity there is no need to add another menu. Whats happening here is that there are two implementations on the menu. To fix the issue change
menu = new SlidingMenu(this);
to
menu = getSlidingMenu();
Dears,
I'm new to Android, and try to use SlidingMenu in my project. I want to create an application with two sliding menus same as Facebook.
With these steps I had crated my application:
SlidingActivity.java
with actionbarsherlock:public class SlidingActivity extends SherlockActivity implements SlidingActivityBase
SlidingActivity
:public class MainMenu extends SlidingActivity
My main activity code:
Now,
menu.setMenu(R.layout.sliding_menu_frame);
will show:And
menu.setSecondaryMenu(R.layout.vehicles_tree);
will show:The following snapshots describe the strange behavior:
setBehindContentView(R.layout.activity_main_menu);
, I noticed that by changing the attached layout.I don't want the forth screen, what I'm doing wrong?
Regards,, Ali Alaswad