Sherlock Action Bar with Sliding menu

邮差的信 提交于 2019-12-03 00:39:43
Alex

I've solved my problem.

In order to make my Action Bar to Slide, I had to modify the SlidingMenu this way:

  1. Checkout a clean copy of ActionBarSherlock and import into your Eclipse workspace.
  2. Add ActionBarSherlock as a dependency to SlidingMenu.
  3. Go into the SlidingActivities that you plan on using make them extend Sherlock__Activity instead of __Activity.

Then I extended my MainActivity from SlidingMapActivity and it worked perfectly.

Okay I think I found your answer. Try checking out this project on github: https://github.com/jfeinstein10/SlidingMenu

Here is a video of it in action: http://www.youtube.com/watch?v=8vNaANLHw-c&feature=youtu.be

In my case, I prefer to add this slideMenu in code.

Well, when you create this SlideMenu:

menu = new SlidingMenu(this);
menu.setMode(SlidingMenu.LEFT);

then set this line too:

menu.attachToActivity(this, SlidingMenu.SLIDING_WINDOW);

This makes the magic!.

Here is a complete project developed by me for easy sliding menu developer http://github.com/leonardosalles/shipp-sliding-menu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!