比较简单,设置好SlidingDrawer控件的handle和content属性就可以了。
 android:content="@+id/content"
 android:handle="@+id/handle" 就可以了。效果如下图:
抽屉没打开的时候。
 
从下往上托Handle按钮,打开抽屉

代码如下:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#808080"
tools:context=".MainActivity" > <SlidingDrawer
android:id="@+id/slidingdrawer"
android:layout_width="fill_parent"
android:layout_height="300dp"
android:content="@+id/content"
android:handle="@+id/handle"
android:orientation="vertical" > <Button
android:id="@+id/handle"
android:layout_width="88dip"
android:layout_height="44dip"
android:text="Handle"> </Button> <LinearLayout
android:id="@+id/content"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#00ff00" > <Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Pls Input:" /> <EditText
android:id="@+id/editText"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</SlidingDrawer> </RelativeLayout>

  这里做的比较简单,当然你可以做的更美观。

 
 

Android 抽屉类SlidingDrawer的使用的更多相关文章

  1. Android 抽屉效果

    昨天在用“酷我音乐”听歌的时候注意到了界面右上角的四角方块,当我点击这个方块的时候会从屏幕的左边弹出新的界面而把原来的界面挤到左边,是显示了一小部分. 于是,我便在网上查询了一下相关的文章,现将这种效 ...

  2. Android抽屉(SlidingDrawer --类似android通知栏下拉效果)

    Android抽屉(SlidingDrawer)的实现发 - 红黑联盟http://www.2cto.com/kf/201301/182507.html 可动态布局的Android抽屉之基础http: ...

  3. Android 抽屉效果的导航菜单实现

    Android 抽屉效果的导航菜单实现 抽屉效果的导航菜单 看了很多应用,觉得这种侧滑的抽屉效果的菜单很好. 不用切换到另一个页面,也不用去按菜单的硬件按钮,直接在界面上一个按钮点击,菜单就滑出来,而 ...

  4. android抽屉总结

    android抽屉:1.DrawerLayout 在xml文件中要注意写全称:android.support.v4.widget.DrawerLayout <LinearLayout /> ...

  5. android Activity类中的finish()、onDestory()和System.exit(0) 三者的区别

    android Activity类中的finish().onDestory()和System.exit(0) 三者的区别 Activity.finish() Call this when your a ...

  6. Android图像格式类及图像转换方法

    Android图像格式类及图像转换方法介绍 一款软件的开发和图像密切相关,特别是移动应用程序,在视觉效果等方面是至关重要的,因为这直接关系到用户的体验效果.在Android程序开发的过程中,了解存在哪 ...

  7. Android 服务类Service 的详细学习

    http://blog.csdn.net/vipzjyno1/article/details/26004831 Android服务类Service学习四大组建   目录(?)[+] 什么是服务 服务有 ...

  8. 项目源码--Android答题类游戏源码

    下载源码 技术要点: 1. 精致的答题UI 2. Android的Http通信技术 3. Android数据库QLITE与其他数据存储技术 4. Android在线音乐背景技术 5. Android答 ...

  9. android application类的用法

    android application类的用法 Application是android系统Framework提供的一个组件,它是单例模式(singleton),即每个应用只有一个实例,用来存储系统的一 ...

随机推荐

  1. HDU 4819 Mosaic(13年长春现场 二维线段树)

    HDU 4819 Mosaic 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4819 题意:给定一个n*n的矩阵,每次给定一个子矩阵区域(x,y,l) ...

  2. echarts在360中以及IE8浏览器不兼容:解决方案

    参考:http://blog.csdn.net/www3300300/article/details/12992489 添加: <head> <meta http-equiv=&qu ...

  3. MINIX3 进程通信分析

    MINIX3 进程通信分析 6.1MINIX3 进程通信概要 MINIX3 的进程通信是 MINIX3 内核部分最重要的一个部件,我个人认为其实这 是内核中的“内核”,怎么来理解这个概念呢?其实 MI ...

  4. Java BTrace实战(1)--BTrace的入门和使用

    前言: 对线上的java服务, 往往采用日志进行问题处理和分析. 倘若日志缺乏相关的信息时, 那又该如何处理? 远程调试会影响服务的正常工作, 修改代码重新部署的方案其实时性和灵活性难以保证(线上服务 ...

  5. 3-5 RPM包校验

    1.RPM包校验 <1>rpm -V 已安装的包名 <2>选项: -V 校验制定RPM包中的文件(verify) <3>说明: <1>若没有显示任何内容 ...

  6. POJ 1488 Tex Quotes --- 水题

    POJ 1488 题目大意:给定一篇文章,将它的左引号转成 ``(1的左边),右引号转成 ''(两个 ' ) 解题思路:水题,设置一个bool变量标记是左引号还是右引号即可 /* POJ 1488 T ...

  7. Ci分开配置网站前台后台的方法

    CodeIgniter 是一个简单快速的PHP MVC框架.EllisLab 的工作人员发布了 CodeIgniter.许多企业尝试体验过所有 PHP MVC 框架之后,CodeIgniter 都成为 ...

  8. scala言语基础学习十一

    隐式转换 使用隐式转换加强现有的类型的功能-类似于设计模式的装饰模式

  9. POJ 1523 SPF(寻找关节点)

                                                                         SPF Time Limit: 1000MS   Memory ...

  10. Linux查找文件

    which 可以查找可执行文件的位置 evilxr@IdeaPad:~$ which ping /bin/ping whereis whereis -m 可查询到命令的帮助文档在什么地方 evilxr ...