zoukankan      html  css  js  c++  java
  • android v13 的新特性

    转载自 http://blog.chengyunfeng.com/?p=493 mark下

    新版本(V13)的support库,几个比较重要的功能

    1、添加 DrawerLayout 控件,支持创建  Navigation Drawer模式。可以设置从左边划出菜单或者右边,也可以左右菜单同时存在。

    2、添加 SlidingPaneLayout 控件来支持各种屏幕上的摘要、详情界面模式。比如 Gmail邮件列表和单个邮件详情界面。当在手机上显示的时候,邮件列表和详情界面分别为两个界面;当在平板上显示的时候,则为一个界面。

    3、添加 ActionBarDrawerToggle 工具类,方便把 DrawerLayout 和 ActionBar 功能结合起来。

    布局

    <android.support.v4.widget.DrawerLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/drawer_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
    
        <FrameLayout
            android:id="@+id/content_frame"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
    
        <ListView
            android:id="@+id/left_drawer"
            android:layout_width="240dp"
            android:layout_height="match_parent"
            android:layout_gravity="start"
            android:choiceMode="singleChoice"
            android:divider="@android:color/transparent"
            android:dividerHeight="0dp"
            android:background="#FF0011"/>
    </android.support.v4.widget.DrawerLayout>

    转载至:http://blog.chengyunfeng.com/?p=493

    代码下载地址:

    https://github.com/asijack/NavigationDrawerExample

  • 相关阅读:
    随便发泄几句
    四年有感
    测试产品杂谈
    质量管理杂谈
    提升
    下半年工作方向
    测试资源分配
    2013思路
    微博吐槽汇总
    招聘
  • 原文地址:https://www.cnblogs.com/asijack/p/4241588.html
Copyright © 2011-2022 走看看