Android 左右滑动菜单 DrawerLayout简单实现

上传者: u010309265 | 上传时间: 2021-03-24 15:56:21 | 文件大小: 4.39MB | 文件类型: ZIP
非常简单地实现左右滑动菜单。 导航抽屉可以显示在屏幕的左右两侧,默认情况下是隐藏的,当用户用手指从边缘向另一侧滑动的时候,会在内容上方出现一个隐藏的面板,此时内容视图区域会变暗。当点击面板外部或者向原来的方向滑动的时候,导航抽屉就会消失。通常这个导航抽屉用来当作流行的侧滑菜单。 这个类就是DrawerLayout,该类位于V4包中。

文件下载

资源详情

[{"title":"( 83 个子文件 4.39MB ) Android 左右滑动菜单 DrawerLayout简单实现","children":[{"title":"DrawerLayoutDemo","children":[{"title":"AndroidManifest.xml <span style='color:#111;'> 870B </span>","children":null,"spread":false},{"title":"res","children":[{"title":"layout","children":[{"title":"right_menu.xml <span style='color:#111;'> 3.12KB </span>","children":null,"spread":false},{"title":"activity_main.xml <span style='color:#111;'> 1.90KB </span>","children":null,"spread":false},{"title":"left_menu.xml <span style='color:#111;'> 343B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-ldpi","children":null,"spread":false},{"title":"drawable-mdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 3.69KB </span>","children":null,"spread":false}],"spread":true},{"title":"values-v11","children":[{"title":"styles.xml <span style='color:#111;'> 331B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-hdpi","children":[{"title":"saoma.png <span style='color:#111;'> 3.25KB </span>","children":null,"spread":false},{"title":"mobile.png <span style='color:#111;'> 3.43KB </span>","children":null,"spread":false},{"title":"background.jpg <span style='color:#111;'> 51.41KB </span>","children":null,"spread":false},{"title":"wode.png <span style='color:#111;'> 9.68KB </span>","children":null,"spread":false},{"title":"dianhua.png <span style='color:#111;'> 11.14KB </span>","children":null,"spread":false},{"title":"blue_sky.png <span style='color:#111;'> 307.89KB </span>","children":null,"spread":false},{"title":"ic_launcher.png <span style='color:#111;'> 7.48KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 12.22KB </span>","children":null,"spread":false}],"spread":true},{"title":"values-v14","children":[{"title":"styles.xml <span style='color:#111;'> 388B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xxhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 24.20KB </span>","children":null,"spread":false}],"spread":true},{"title":"values","children":[{"title":"strings.xml <span style='color:#111;'> 179B </span>","children":null,"spread":false},{"title":"styles.xml <span style='color:#111;'> 801B </span>","children":null,"spread":false},{"title":"arrays.xml <span style='color:#111;'> 250B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"src","children":[{"title":"com","children":[{"title":"example","children":[{"title":"drawerlayouttest","children":[{"title":"MainActivity.java <span style='color:#111;'> 4.26KB </span>","children":null,"spread":false},{"title":"LeftMenuFragment.java <span style='color:#111;'> 450B </span>","children":null,"spread":false},{"title":"RightMenuFragment.java <span style='color:#111;'> 452B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"proguard-project.txt <span style='color:#111;'> 781B </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"classes","children":[{"title":"com","children":[{"title":"example","children":[{"title":"drawerlayouttest","children":[{"title":"R$bool.class <span style='color:#111;'> 758B </span>","children":null,"spread":false},{"title":"MainActivity$1.class <span style='color:#111;'> 1.68KB </span>","children":null,"spread":false},{"title":"R$color.class <span style='color:#111;'> 3.47KB </span>","children":null,"spread":false},{"title":"R$styleable.class <span style='color:#111;'> 15.78KB </span>","children":null,"spread":false},{"title":"BuildConfig.class <span style='color:#111;'> 365B </span>","children":null,"spread":false},{"title":"RightMenuFragment.class <span style='color:#111;'> 788B </span>","children":null,"spread":false},{"title":"R.class <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"MainActivity.class <span style='color:#111;'> 2.67KB </span>","children":null,"spread":false},{"title":"R$anim.class <span style='color:#111;'> 629B </span>","children":null,"spread":false},{"title":"R$layout.class <span style='color:#111;'> 1.68KB </span>","children":null,"spread":false},{"title":"R$attr.class <span style='color:#111;'> 7.19KB </span>","children":null,"spread":false},{"title":"R$style.class <span style='color:#111;'> 14.80KB </span>","children":null,"spread":false},{"title":"R$id.class <span style='color:#111;'> 2.67KB </span>","children":null,"spread":false},{"title":"R$array.class <span style='color:#111;'> 422B </span>","children":null,"spread":false},{"title":"R$integer.class <span style='color:#111;'> 445B </span>","children":null,"spread":false},{"title":"R$string.class <span style='color:#111;'> 1.36KB </span>","children":null,"spread":false},{"title":"R$dimen.class <span style='color:#111;'> 2.73KB </span>","children":null,"spread":false},{"title":"LeftMenuFragment.class <span style='color:#111;'> 785B </span>","children":null,"spread":false},{"title":"R$drawable.class <span style='color:#111;'> 3.30KB </span>","children":null,"spread":false},{"title":"MainActivity$2.class <span style='color:#111;'> 1.51KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true},{"title":"android","children":[{"title":"support","children":[{"title":"v7","children":[{"title":"appcompat","children":[{"title":"R$bool.class <span style='color:#111;'> 758B </span>","children":null,"spread":false},{"title":"R$color.class <span style='color:#111;'> 3.47KB </span>","children":null,"spread":false},{"title":"R$styleable.class <span style='color:#111;'> 15.42KB </span>","children":null,"spread":false},{"title":"R.class <span style='color:#111;'> 1015B </span>","children":null,"spread":false},{"title":"R$anim.class <span style='color:#111;'> 629B </span>","children":null,"spread":false},{"title":"R$layout.class <span style='color:#111;'> 1.58KB </span>","children":null,"spread":false},{"title":"R$attr.class <span style='color:#111;'> 7.19KB </span>","children":null,"spread":false},{"title":"R$style.class <span style='color:#111;'> 14.70KB </span>","children":null,"spread":false},{"title":"R$id.class <span style='color:#111;'> 2.61KB </span>","children":null,"spread":false},{"title":"R$integer.class <span style='color:#111;'> 445B </span>","children":null,"spread":false},{"title":"R$string.class <span style='color:#111;'> 1.30KB </span>","children":null,"spread":false},{"title":"R$dimen.class <span style='color:#111;'> 2.73KB </span>","children":null,"spread":false},{"title":"R$drawable.class <span style='color:#111;'> 3.08KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"dexedLibs","children":[{"title":"android-support-v4-ae58d33df53c957772f9974630ea84f0.jar <span style='color:#111;'> 334.73KB </span>","children":null,"spread":false},{"title":"android-support-v7-appcompat-cef88260fc936d84c61fa7baa48c3e75.jar <span style='color:#111;'> 200.51KB </span>","children":null,"spread":false},{"title":"appcompat_v7-ce904458575a2c5c2b2d87e58c19f078.jar <span style='color:#111;'> 166B </span>","children":null,"spread":false}],"spread":true},{"title":"AndroidManifest.xml <span style='color:#111;'> 870B </span>","children":null,"spread":false},{"title":"res","children":[{"title":"crunch","children":[{"title":"drawable-mdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 3.04KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-hdpi","children":[{"title":"saoma.png <span style='color:#111;'> 2.24KB </span>","children":null,"spread":false},{"title":"mobile.png <span style='color:#111;'> 2.41KB </span>","children":null,"spread":false},{"title":"wode.png <span style='color:#111;'> 6.06KB </span>","children":null,"spread":false},{"title":"dianhua.png <span style='color:#111;'> 6.33KB </span>","children":null,"spread":false},{"title":"blue_sky.png <span style='color:#111;'> 304.54KB </span>","children":null,"spread":false},{"title":"ic_launcher.png <span style='color:#111;'> 5.82KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 9.14KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xxhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 17.47KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true},{"title":"jarlist.cache <span style='color:#111;'> 366B </span>","children":null,"spread":false},{"title":"R.txt <span style='color:#111;'> 48.38KB </span>","children":null,"spread":false},{"title":"classes.dex <span style='color:#111;'> 1.91MB </span>","children":null,"spread":false},{"title":"resources.ap_ <span style='color:#111;'> 715.29KB </span>","children":null,"spread":false},{"title":"DrawerLayoutDemo.apk <span style='color:#111;'> 1.24MB </span>","children":null,"spread":false}],"spread":true},{"title":".classpath <span style='color:#111;'> 475B </span>","children":null,"spread":false},{"title":"assets","children":null,"spread":false},{"title":"project.properties <span style='color:#111;'> 607B </span>","children":null,"spread":false},{"title":"ic_launcher-web.png <span style='color:#111;'> 50.19KB </span>","children":null,"spread":false},{"title":".settings","children":[{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 177B </span>","children":null,"spread":false}],"spread":true},{"title":"libs","children":[{"title":"android-support-v4.jar <span style='color:#111;'> 972.06KB </span>","children":null,"spread":false}],"spread":true},{"title":".project <span style='color:#111;'> 852B </span>","children":null,"spread":false},{"title":"gen","children":[{"title":"com","children":[{"title":"example","children":[{"title":"drawerlayouttest","children":[{"title":"R.java <span style='color:#111;'> 349.47KB </span>","children":null,"spread":false},{"title":"BuildConfig.java <span style='color:#111;'> 170B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false},{"title":"android","children":[{"title":"support","children":[{"title":"v7","children":[{"title":"appcompat","children":[{"title":"R.java <span style='color:#111;'> 64.11KB </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":true}],"spread":false}],"spread":true}]

评论信息

  • niguangbiao :
    很好的demo 值得参考!
    2016-01-28
  • shinobu59 :
    效果不错,可以借鉴
    2015-09-22
  • chouchisan :
    貌似是api21,小白不懂,乱说的
    2015-09-21
  • Benjamin1984 :
    不知道为什么,我这里好像编译不通过。
    2015-06-09

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明