Use slidingmenu and actionbarsherlock in an open-source project

Source: Internet
Author: User

Open Source Project slidingmenu address: https://github.com/jfeinstein10/SlidingMenu

Open Source Project actionbarsherlock address: https://github.com/JakeWharton/ActionBarSherlock

First, download the zip packages for the two projects.

Note:The three projects created below need the same android-support-v4.jar !!!

Because Maven has never been used before, you can only do it manually. Create an android project in eclipse, for example, the androidmanifest under the downloaded JakeWharton-ActionBarSherlock-e5c2d1c/library folder. XML, Libs folder, project. properties, Res folder, Src folder these five copies, directly overwrite the created actionbarsherlocklibrary project, build path import android-support-v4.jar, put the project aside.

Create an android project in eclipse, for example, slidingmenulibrary. androidmanifest In the downloaded slidingmenu-master/library folder. XML, Libs folder, project. properties, Res folder, Src folder these five copies, directly overwrite the created slidingmenulibrary project, build path import android-support-v4.jar, right-click slidingmenulibrary, click Properties, select Android option, click the Add button in the lower-right corner of the window. In the displayed dialog box, select the actionbarsherlocklibrary project, click OK in the dialog box, and click OK in the lower-right corner of the properties interface to save the project, as a result, actionbarsherlocklibrary is S Lidingmenulibrary references.

After the preceding steps are completed, open singingfragmentactivity. Java in the com. slidingmenu. Lib. app package of the SRC file of the slidingmenulibrary project, and set

 
Public ClassSlidingfragmentactivityExtendsFragmentactivityImplementsSlidingactivitybase

To:

Public ClassSlidingfragmentactivityExtendsSherlockfragmentactivityImplementsSlidingactivitybase

In this case, the library of slidingmenu is combined with the library of actionbarsherlock! Next, create a project to use slidingmenulibrary. For example, create a project named slidingmenu and download androidmanifest in the slidingmenu-master/example folder. XML, Libs folder, project. properties, Res folder, Src folder copy, directly overwrite the created slidingmenu project, build path import two jar packages, right-click slidingmenu, and click Properties, select the android option, click the Add button in the lower-right corner of the window, select the slidingmenulibrary project in the pop-up dialog box, and click the OK button in the dialog box (as shown in Figure ), click the OK button in the lower-right corner of the properties interface to save it. As a result, slidingmenulibrary is referenced by slidingmenu as a library (It is equivalent to importing slidingmenulibrary to slidingmenu, while importing actionbarsherlocklibrary to slidingmenulibrary).

It is done. Before Running slidingmenu, you 'd better clean the three projects ~

 

You can leave your email box for your child shoes that are too lazy to work on ~~~

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.