Reprinted from http://blog.chengyunfeng.com/?p=493 Mark under
New version (V13) Support library, a few of the more important features
1, 添加 DrawerLayout control, support to create Navigation drawer mode. Can be set from the left side of the menu or the right side, can also left the menu to exist.
2, add SlidingPaneLayout the control to support a variety of on-screen summary, detail interface mode. such as Gmail mailing lists and individual mail detail interfaces. When displayed on the phone, the mailing list and the detail interface are two interfaces respectively, and when displayed on the tablet, it is an interface.
3, add ActionBarDrawerToggle tool class, convenient to put DrawerLayout andActionBar 功能结合起来。
Layout
<Android.support.v4.widget.DrawerLayoutxmlns:android= "Http://schemas.android.com/apk/res/android"Android:id= "@+id/drawer_layout"Android:layout_width= "Match_parent"Android:layout_height= "Match_parent"> <FramelayoutAndroid:id= "@+id/content_frame"Android:layout_width= "Match_parent"Android:layout_height= "Match_parent" /> <ListViewAndroid: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>
Reprint to: http://blog.chengyunfeng.com/?p=493
Code:
Https://github.com/asijack/NavigationDrawerExample
New features of Android V13