Reprint Please specify source: http://blog.csdn.net/zhoubin1992/article/details/46973483
Preface
Open source project in Trinea it
Https://github.com/Trinea/android-open-project#%E4%B8%89menu
Many of the menu open source libraries are recommended.
First, give an introduction to Slidingmenu in Trinea.
Slide-out menu, slide out menu by dragging screen edge, support screen left and right, support menu zoom, scale and slide up three kinds of animation styles appear. Slidingmenu supports menu animation styles when compared to Menudrawer, Menudrawer supports menu view on top and bottom of content
Project Address: Https://github.com/jfeinstein10/SlidingMenu
Demo Address: Https://play.google.com/store/apps/details?id=com.slidingmenu.example
App Examples: Foursquare, LinkedIn, Zappos, Rdio, Evernote Food, Plume, VLC for Android, ESPN Scorecenter, MLS matchday, 9GAG, Wun Derlist 2, the Verge, MTG familiar, Mantano Reader, Falcon Pro (BETA), MW3 Barracks
For the side-pull navigation menu This piece, the earliest slidingmenu effect is widely used, and then Google launched its own original ecological side-pull menu navigationdrawer, but this and actionbar.tab combined with a lot of problems. Now the material design style of the navigation drawer should be the most respected it. For example, the materialdrawermaterial design-style navigation drawer provides easy and powerful customization.
Project Address: Https://github.com/mikepenz/MaterialDrawer
slidingmenu Demo Configuration
Although Slidingmenu is outdated, the spirit of learning open-source project attitude to learn slidingmenu, of course, the best practice is to learn his demo, but set up the demo encountered some problems, here to summarize the problems encountered. Give the right way to open, haha.
1. Download Slidingmenu
Open Source project:
Https://github.com/jfeinstein10/SlidingMenu
2. Download Actionbarsherlock
Open Source project:
Https://github.com/JakeWharton/ActionBarSherlock
3. Unzip and import the IDE
3.1 Import the Actionbarsherlock-master.zip into eclipse after extracting the Actionbarsherlock from the package.
Menu The first item file–import– Select the location of the library to import.
3.2 Slidingmenu-master.zip the library into eclipse after unpacking the package.
Set the Actionbarsherlock and library as Lib projects.
3.3 in library, add the Actionbarsherlock Library project. Because the library uses the Actionbarsherlock library.
Step right library--"properties--" android--"Add select Actionbarsherlock Library and OK.
Added here will be an error to see Logcat will find the library and Actionbarsherlock in the Android-support-v4.jar version inconsistent.
The workaround is to delete the Android-support-v4.jar in the Libs of the Library project.
4. Import the Demo project
The example in the package is imported into eclipse after Slidingmenu-master.zip decompression. This is our demo project. In example, the library project is introduced.
5. Modify the three Java files in the Library project.
The Slidingactivity.java, the Slidingfragmentactivity.java, the Slidingpreferenceactivity.java.
Slidingactivity extends Activity Slidingfra Gmentactivity extends fragmentactivity slidingpreferenceactivity extends preferenceactivity modified to: slidingactivity Extends sherlockactivity slidingfragmentactivity extends sherlockfragmentactivity slidingpreferenceactivity ext Ends Sherlockpreferenceactivity
Then three files are imported into each other
Import com.actionbarsherlock.app.SherlockActivity;
Import com.actionbarsherlock.app.SherlockFragmentActivity;
Import com.actionbarsherlock.app.SherlockPreferenceActivity;
It's ready to run.
Summary
After running, you will find that the side drop menu does not overwrite the main interface, but rather the main interface. This is a different place from Navigationdrawer.
While the side-pull menu opens, it overwrites the Actionbar, and Navigationdrawer does not.
Furthermore Slidingmenu will be continuously redrawn globally, so if the animation is more than the card.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Android Open source side Pull menu Slidingmenu Demo configuration and learning