SlidingMenu is an open source Android development library that allows developers to easily create sliding menus in their Android apps, similar to the app menus of Google+, YouTube, and Facebook. Let's take a look at the effect of SlidingMenu. How to use A simple DEMO example:
XML configuration method If you want to use SlidingMenu as a view, the xml layout file can be written as follows:
Note: You cannot use behindOffset and behindWidth at the same time, otherwise an error will occur. Introduction to Android SlidingMenu Now many Android applications have side-sliding menus, which work very well. There is an open source library of SlidingMenu on GitHub, which is very convenient to use. SlidingMenu GitHub address: https://github.com/jfeinstein10/SlidingMenu. GitHub says that Sliding can be more functional when combined with ActionBarSherlock. ActionBarSherlock GitHub address: https://github.com/JakeWharton/ActionBarSherlock Next, let's introduce the use of SlidingMenu. (1) Download the zip file from GitHub and decompress it to get a folder called library. (2) Eclipse import Existing Android Code Into Workspace. Right-click the project and select Properties->Android. You can see that it is Library. (3) Right-click the project that will use SlidingMenu and select Properties->Android. Under Library, add the project imported in (2). (4) To ensure that the SlidingMenu library is successfully applied to the project, you must ensure that the libs used by the project and the libs used by the SlidingMenu library are consistent in version, mainly referring to android-support-v4.jar. If the project libs does not exist or the compilation fails, you can try to create a new libs folder and put android-support-v4.jar in it. Right-click on libs->Build Path->Use as Source. This can usually solve the problem. (5) After step (4), you can use SlidingMenu directly in your project. Java code: MainActivity:
XML layout code: layout/slidingmenu.xml:
Some common property settings for SlidingMenu are recorded as follows:
Original link: http://www.codeceo.com/article/android-slidingmenu-2.html Author: Xiaofeng from Coder.net |
<<: Exclusive interview with Umeng: Focusing on data services for the mobile development ecosystem
>>: HTML5 game performance is greatly improved, Egret Engine 1.5 is released
Today, let’s talk about UGC. UGC is not a tool pr...
The case reviewed in this article is an activity ...
1. What is ASO ? It mainly uses machines and a se...
In this era where everyone is a media, the audien...
What will the iPhone 6 UI look like after it becom...
Produced by: Science Popularization China Author:...
In fact, objectively speaking, the result of a ga...
Internal traffic AppStore traffic distribution = e...
DeepSeek has shaken up the AI industry, surpass...
The categories of operations include data operati...
If anyone wants to be on the hot search these day...
The overnight collapse of the Jiyue shocked the i...
With its huge user base and increasingly sophisti...
Recently, Shenzhen, Guangdong A father holding hi...