If you are not talking nonsense, you can directly get into the subject. Please carefully read the process and instructions below.
First, go to the slidingmenu official website and download a piece of code,
Decompress the package. The directory is as follows:
Figure-1
The following describes how to import slidingmenu.
Figure 2
1. Import the file selected in figure-1 to eclipse, just as if you were importing a source code: tool bar file -- import -- Android -- existing Android code into wokingspace. Because it is a library, you do not need to set the is library after the import.
2. Clean the project after the import. Toolbar project -- clean
3. Because the slidingmenu project uses the code of actionbarsherlock of another open-source project, it needs to be imported to eclipse and then used as a library for slidingmenu.
This is the directory after the actionbarsherlock is decompressed and the selected part is imported. It is also a library.
4. Right-click the slidingmenu project and name it liabrary. Select build path -- select Android --
Click Add, add actionbarsherlock, apply, and click OK.
At this time, an error occurs,
This is because slidingmenu and actionbarsherlock both use the android-suppotr-v4 package, delete the android-suppotr-v4 package in libs in slidingmenu.
5. If you use the activties of actionbarsherlock, You need to replace the activyties of Android with the activities encapsulated by actionbarsherlock.
6. Create a new project. If you want to use slidingmenu, import the library slidingmenu. Also delete the android-suppotr-v4 package because there is an actionbarsherlock in it.
The last example is very simple. Let's take a look at the effect:
7. The last note is that if you want to save the Demo code, you must not only save the code of slidingmenudemo, but also save the slidingmenu Library and the Library of actionbarsherlock. Import the above three projects together during running.
OK