效果:

   ---->点击图标-->  

实现:只要用SlidingDrawer控件就可以做出点击图标,显示或隐藏内容,不需要再MainActivity上写任何代码,可以参考官网文档https://developer.android.google.cn/reference/android/widget/SlidingDrawer做更多的事

main.xml:

     android:id="@+id/drawer"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:handle="@+id/handle"     android:content="@+id/content">              android:id="@id/handle"         android:layout_width="88dip"         android:layout_height="44dip" />              android:id="@id/content"         android:layout_width="match_parent"         android:layout_height="match_parent" /> 


更多相关文章

  1. android 5.0以上通知栏、状态栏图标变成白色
  2. Android(安卓)Canvas设置绘画时重叠部分的处理模式【含效果图】
  3. Android开发------------杂记
  4. Android(安卓)Vibrator震动效果
  5. linux下如何为刚安装好的Eclipse在桌面建一个启动图标???(QtCreator
  6. android:text文字添加阴影效果
  7. Android屏幕大小适配问题解决
  8. Android(安卓)常用开源库
  9. android 自定义组合控件并实现点击事件

随机推荐

  1. android 阻尼效果(图片下拉变大)
  2. Google支付V3.0集成,使用Google play结算
  3. Android学习笔记(一)-Android与3G简介
  4. android-【机型-版本-分辨率】测试点罗列
  5. Android开发之低调的Service
  6. Perl登陆Android
  7. Android自动化测试框架Robotium
  8. adb使用-详细教程(Awesome Adb)
  9. android之resources资源
  10. Android 轮询最佳实践 Service + AlarmMa