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