一.简单示例

src不变


main.xml

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:layout_width="fill_parent"    android:layout_height="fill_parent"    android:orientation="vertical" >        <TextView        android:layout_width="fill_parent"        android:layout_height="wrap_content"        android:text="欢迎进入最简单的抽屉类实例" >    </TextView>    <SlidingDrawer        android:id="@+id/slidingDrawer1"        android:layout_width="match_parent"        android:layout_height="match_parent"        android:content="@+id/content"        android:orientation="horizontal"        android:handle="@+id/handle" >        <Button            android:id="@+id/handle"            android:layout_width="wrap_content"            android:layout_height="wrap_content"            android:text="Handle" />        <LinearLayout            android:id="@+id/content"            android:background="#ffffff"            android:layout_width="match_parent"            android:layout_height="match_parent" >        </LinearLayout>    </SlidingDrawer>    </LinearLayout>


AndroidManifest.xml不变


二. 结果

启动

Android之SlidingDrawer滑动抽屉_第1张图片


点击Handle按钮




更多相关文章

  1. 【Android】柱状图示例
  2. android创建数据库(SQLite)保存图片示例
  3. Android基础知识_Activity标准启动模式示例
  4. LGame(Android及J2SE游戏引擎)入门示例——如何构建一个游戏
  5. Androidの联系人群组Group操作示例

随机推荐

  1. Android(安卓)实现开机自启动 Service
  2. Android(安卓)ble setCharactersticNotif
  3. android WebView结合javascript相互调用
  4. Android(安卓)使用 Gmail 来发送邮件
  5. Android(安卓)Studio打包时出现transform
  6. Android自定义对话框(Dialog)位置,大小
  7. Android(安卓)animation - 文字旋转示例
  8. android launch 初探
  9. Android适配底部虚拟键盘遮挡布局的解决
  10. android仿滴滴司机端滑动接到乘客,送达乘