android DrawerLayout实现仿QQ侧滑菜单
来源:互联网 发布:linux 守护进程 编辑:程序博客网 时间:2024/05/16 01:08
公司要做一侧滑菜单,和QQ类似的侧滑菜单效果。利用DrawerLayout实现效果比较好。实现比较简单。
布局代码:
/
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/id_drawerLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/sidebar_bg" >
<LinearLayout
android:id="@+id/id_center_linear"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
</LinearLayout>
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/id_drawerLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/sidebar_bg" >
<LinearLayout
android:id="@+id/id_center_linear"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
</LinearLayout>
<!-- 需注意设置tag为LEFT -->
<LinearLayout
android:id="@+id/id_left_menu"
android:layout_width="250dp"
android:layout_height="match_parent"
android:layout_gravity="left"
android:orientation="horizontal"
android:tag="LEFT"
>
</LinearLayout>
</android.support.v4.widget.DrawerLayout>
<LinearLayout
android:id="@+id/id_left_menu"
android:layout_width="250dp"
android:layout_height="match_parent"
android:layout_gravity="left"
android:orientation="horizontal"
android:tag="LEFT"
>
</LinearLayout>
</android.support.v4.widget.DrawerLayout>
效果图:
录屏有点问题,见谅!
0 0
- android DrawerLayout实现仿QQ侧滑菜单
- 仿QQ侧滑菜单,HorizontalScrollView和DrawerLayout实现对比
- Android Toolbar+DrawerLayout+PagerSlidingTabStrip实现仿csdn侧滑菜单
- Android中DrawerLayout(仿QQ双向侧滑菜单效果)
- Android自定义View之仿QQ侧滑菜单实现
- Android仿QQ侧滑菜单小红点的实现
- Android 高仿QQ5.2双向侧滑菜单DrawerLayout实现源码
- Android DrawerLayout 高仿QQ5.2双向侧滑菜单
- Android DrawerLayout 高仿QQ5.2双向侧滑菜单
- Android DrawerLayout 高仿QQ5.2双向侧滑菜单
- Android DrawerLayout 高仿QQ5.2双向侧滑菜单
- Android DrawerLayout 高仿QQ5.2双向侧滑菜单
- Android DrawerLayout 高仿QQ5.2双向侧滑菜单
- Android DrawerLayout 高仿QQ5.2双向侧滑菜单
- Android DrawerLayout 高仿QQ5.2双向侧滑菜单
- Android DrawerLayout 高仿QQ5.2双向侧滑菜单
- Android DrawerLayout 高仿QQ5.2双向侧滑菜单
- Android DrawerLayout 高仿QQ5.2双向侧滑菜单
- Linux-(6)Vi/Vim的基本操作
- iphone 持久性存储
- Java中enum用法详解
- SQlite的使用
- 熟悉Visual C++ IDE
- android DrawerLayout实现仿QQ侧滑菜单
- ArcGIS教程:ArcGIS中的栅格计算
- 3D坐标变换之自转公转
- 整数划分
- 智能设备安全吗—Synack逆向Dropcam过程整理
- 数据库学习笔记系列(6)——等值与非等值连接查询
- 北大青鸟北科教学本部
- 数据结构之二叉查找树(BST)-(六)
- 关于CvSeq指针的内存释放问题