1,实现效果
-
点击切换按钮弹出菜单,并且菜单和按钮动画,有联动效果
2,实现逻辑
【1】MainActivity的onCreate方法中创建,ActionBarDrawerToggle (V7包下)
-
布局文件
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.xiaoshuai.www.actionbar.MainActivity">
<FrameLayout