1,实现效果
-
点击按钮切换主题
2,实现逻辑
【1】把资源文件拷贝到对应的values-v21下,color.xml 和styles.xml
【2】创建布局
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
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.itheima.a001actionbar.MainActivity">
<FrameLayout
android:id="@+id/content"
android:background="#FFF000"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<FrameLayout
android:id="@+