Android side-Pull menu Slidingmenu configuration and use

Source: Internet
Author: User

Personal Blog Address www.zalezone.cn
Objective

Many of the Android menu is very flashy, which is used for a number of side-pull menu , such as singing, before everyone, of course, there are many clients may use the other after the revision, but Slidingmenu Is indeed a very powerful tool.

Environment configuration

Many tools have a dazzling effect to attract the user's eye, but these dazzling effects must be a cost, that is a lot of code support, this project page is no exception, in the configuration of the environment is likely to encounter a series of problems, the following to write a detailed configuration of the steps and possible problems .

Preparatory work
    • First go to the Internet to download the corresponding dependency project, here are mainly downloaded in GitHub above the two items, one is slidingmenu, the other is Actionbarsherlock. Import these two projects into eclipse, where you can get two projects after Slidingmenu import Eclipse, one is examplelistactivity, the other is the library, This library is a dependency package for the previous project.
    • How do you rely on a project as another project? You can right-click on the project and select Properties, there is an IS Library option in the Android column, and the project will be dependent on other projects.
    • The downloaded actionbarsherlock is then added to eclipse, and the added project is also configured as a Library, and then the examplelistactivity Add this dependency in the.
Dependency and version Unification
    • If the API level of each imported item is different, it will be error when loading, so it is better to change the API level of each imported file into the same one.
    • If you have a different version of the Android-support-v4.jar of the imported projects will be error, then you need to manually change the various versions of the jar package to be unified.
Modify Code
    • Open the slidingfragmentactivity class in the Library project and add the following code to declare the class
1
import com.actionbarsherlock.app.SherlockFragmentActivity;
    • Then replace the code, and the file in the
1
Class Slidingfragmentactivity extends Fragmentactivity implements Slidingactivitybase
    • Replace it with the following line
1
 Public  classslidingfragmentactivityextends sherlockfragmentactivity  ImplementsSlidingactivitybase
Test

If not unexpected, you can now run the side-drop menu of the sample program, the sample program is just a general outline, the specific configuration requires you to manually adjust, the following picture is a use of slidingmenu application

How to use

Learning .....

Reference links

Android side-Pull menu Slidingmenu configuration and use

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.