"Android UI design and development" phase 16th: Sliding menu bar (i) Use of open source project Slidingmenu

Source: Internet
Author: User

Reprint Please specify source: http://blog.csdn.net/yangyu20121224/article/details/9255829

Since the recent work is really busy, so this series of tutorials for some time has not been updated, but also please readers forgive me. This issue is mainly about the effect of sliding menu bar implementation.

I. Introduction of Slidingmenu

I believe that everyone is not unfamiliar with the slidingmenu, it is a relatively new set interface or configuration interface effect, in the main interface left or right slide appear to set the interface effect, can easily carry out a variety of operations. Many good apps use this interface, like Facebook, Renren, Everynote, Google +, and more. As shown in the following:

Google + Interface Everynote interface

Because the effect is really relatively new, so in a lot of application development to achieve this effect, the solution is different. Many comparisons are made later

Now, or the open source project on GitHub, Slidingmenu offers the best possible implementation: flexible customization, a variety of shades and gradients, and animations that have a good sliding effect. But this is an open source library, not a complete project, to introduce it as a libary into your own project, simple configuration can achieve slidingmenu effect.

Second, the use of Slidingmenu

Slidingmenu_library

To be able to achieve the Slidingmenu effect, you must first import it as a libary into your project, first look at its directory structure,

The code in this I will not explain in detail, mainly to teach you how to use directly, but the blogger on the code to make some very detailed note

, interested students can study well.

1. After the download is complete, import this project into the Eclipse development environment and follow these steps:

<1> Right click, click "Import" button, Pop-up dialog box options;

<2> Select the "Existing Projects into Workspace" option;

<3> after clicking the Browser button, the Option Item dialog box appears, selecting the item to import;

<4> Click "Finish" to complete.

2. After importing the project, then create a new Android project and import the slidingmenu_library into the new Android project with the following steps:

<1> Right click on the new Android project and click on the "Properties" option at the bottom.

<2> Click the "Android" option on the left and then click the "Add" button at the bottom right after clicking on the popup dialog box.

<3> Click on the popup dialog to select the previously imported Slidingmenu_library project;

<4> after selection;

<5> This shows that the import library has been successful, and after the successful import, a Slidingmenu_library.jar package will appear in the Android reference package;

Note: Here's a place to pay special attention, after the new Android project, the newer version of Eclipse will be in the Android directory

Generate a Libs folder, there will be a Android-support-v4.jar jar package, this jar must remember to delete, or run the program when

There will be an exception, the hint is not to find the class exception, bloggers in this place tangled for a long time. Finally, the reason for the exception is that the import

Slidingmenu_library class Library, the class library itself contains the Android-support-v4.jar jar package, so the runtime will be

Now abnormal, the system does not know which path to call under the package, so the program crashes, the prompt cannot find the class.

This article is finished here, the following article I will be a lot of different sample effects to teach you as

How to use Slidingmenu_library, as well as subsequent articles will also bring imitation singing bar, impression notes and NetEase News

and other practical projects to show the sliding effect to everyone. I hope you can continue to pay attention!

"Android UI design and development" phase 16th: Sliding menu bar (i) Use of open source project Slidingmenu

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.