1 Star 0 Fork 0

懂不能懂/SlideMenu

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0
SlideMenu([Demo][2])<img src="https://api.travis-ci.org/TangKe/SlideMenu.png?branch=master" /> ========= SlideMenu is a open source android library provide slide effect to the layout and show the hidden menu behind the layout <img src="https://github.com/TangKe/SlideMenu/wiki/images/snap1.png" width="140" /> <img src="https://github.com/TangKe/SlideMenu/wiki/images/snap2.png" width="140" /> <img src="https://github.com/TangKe/SlideMenu/wiki/images/snap3.png" width="140" /> <img src="https://github.com/TangKe/SlideMenu/wiki/images/snap4.png" width="140" /> <img src="https://github.com/TangKe/SlideMenu/wiki/images/snap5.png" width="140" /> #Setup To enable fantasitic feature in your project with the following simple steps: 1. Download the project from [GitHub][1] 2. Import it to your Eclipse workspace 3. Set your project properties, then add a android project library, and select SlideMenu #Usage Use the SlideMenu as a View as usual, Java and XML are both supported ##Java example: ```java public class SlideMenuActivity extends Activity{ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); SlideMenu slideMenu = new SlideMenu(this); setContentView(slideMenu); // Setup the content View contentView = new View(this); slideMenu.addView(contentView, new SlideMenu.LayoutParams( LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, LayoutParams.ROLE_CONTENT)); // Setup the primary menu View primaryMenu = new View(this); slideMenu.addView(primaryMenu, new SlideMenu.LayoutParams(300, LayoutParams.MATCH_PARENT, LayoutParams.ROLE_PRIMARY_MENU)); // Setup the secondary menu View secondaryMenu = new View(this); slideMenu.addView(secondaryMenu, new SlideMenu.LayoutParams(300, LayoutParams.MATCH_PARENT, LayoutParams.ROLE_SECONDARY_MENU)); } } ``` ##XML layout example: ```xml <com.aretha.slidemenu.SlideMenu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:slidemenudemo="http://schemas.android.com/apk/res-auto" android:id="@+id/slideMenu" android:layout_width="match_parent" android:layout_height="match_parent" slidemenudemo:primaryShadowDrawable="reference" slidemenudemo:primaryShadowWidth="dimension" slidemenudemo:secondaryShadowWidth="dimension" slidemenudemo:secondaryShadowDrawable="reference" slidemenudemo:slideDirection="left|right" > <View android:layout_width="match_parent" android:layout_height="match_parent" slidemenudemo:layout_role="content" /> <View android:layout_width="200dip" android:layout_height="match_parent" slidemenudemo:layout_role="primaryMenu" /> <View android:layout_width="300dip" android:layout_height="match_parent" slidemenudemo:layout_role="secondaryMenu" /> </com.aretha.slidemenu.SlideMenu> ``` *NOTE: the children of SlideMenu must be specified layout_role attribute, otherwise the SlideMenu will throw a Exception. SlideMenu must be the root of layout.* * `primaryShadowWidth` the shadow width above primary menu, left side of content * `secondaryShadowWidth` the shadow width above secondary menu, right side of content * `primaryShadowDrawable` the shadow drawable above primary menu, left side of content * `secondaryShadowDrawable` the shadow drawable above secondary menu, right side of content * `slideDirection` specified the slide direction of SlideMenu, left, right, left|right #Author Tang Ke tang.ke@me.com #Trello Please visit this [board][3] to see the plan of this repo #License Copyright (c) 2011-2013 Tang Ke Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. [1]: http://www.github.com/TangKe/SlideMenu.git [2]: https://github.com/TangKe/SlideMenu/wiki/SlideMenu.apk [3]: https://trello.com/board/slidemenu/514932078a91614c640056df [4]: https://travis-ci.org/TangKe/SlideMenu

简介

A simple SlideMenu library with two menu behind content for Android developer, just feel free to fork, this project need your contribution. 展开 收起
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/295047320/SlideMenu.git
git@gitee.com:295047320/SlideMenu.git
295047320
SlideMenu
SlideMenu
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385