How to use Slidingmenu and how Android Studio imports third-party libraries Slidingmenu

Source: Internet
Author: User

first, the method of using Slidingmenu

1. Introduction of Slidingmenu Library

2. Inheriting slidingfragmentactivity

3, OnCreate method changed to public

4. Call the relevant API

second, how does Android Studio import third-party library Slidingmenu?

Material:third-party library downloaded from GitHub website slidingmenu-master.zip

Steps:

1. Create a new project (my Project is newsreports)

2. Create a new Slidingmenulibraries folder under the Newsreports directory and extract the Slidingmenu-master.zip to the folder.

3. Modify the Setting.gradle file

Include ': App ', ': Slidingmenulibrary:slidingmenu-master:library '

4, modify the app Build.gradle file

Compile project (': Slidingmenulibrary:slidingmenu-master:library ')

5, modify slidingmenulibraries\slidingmenu-master\library under the Build.gradle file (refer to the app Build.gradle file and Setting.gradle file)

6. Sync Project with Gradle Files, Tools, and Android, then rebuild project. You can see that the Library folder is already bold, indicating that it is already a moudle of the project.

7, Flie, project structure->app->dependencies, you can find that the library import is successful.

when using the Slidingmenu method, an error occurred after import, indicating that the sin function could not find the symbolWorkaround: Change directly to (float) Math.sin (f) 

How to use Slidingmenu and how Android Studio imports third-party libraries 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.