任何人都可以指出爲什麼我的抽屜開關(用於打開導航抽屜的動畫的小漢堡圖標)拒絕切換我的顏色嗎?這給我造成了很多停機時間,我似乎無法弄清楚原因。更改Android上工具欄中DrawerToggle的顏色
這是我的主題 - 抽屜切換採用disabled_default_text的顏色。
<style name="Theme.MyApp.NoActionBar" parent="Theme.MyApp.NoActionBar">
<item name="actionBarStyle">@style/Widget.MyApp.ActionBar</item>
<item name="colorAccent">@color/cs7</item>
<item name="colorControlNormal">@color/disabled_default_text</item>
</style>
而這裏的工具欄佈局:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/ab_solid"
android:minHeight="?attr/actionBarSize"
app:theme="@style/MyToolbarTheme"
app:elevation="@dimen/toolbar_elevation"/>
MyToolbarTheme - 在我覆蓋colorControlNormal用白色。
<style name="MyToolbarTheme" parent="@style/Widget.AppCompat.ActionBar.Solid">
<item name="background">@drawable/ab_solid</item>
<item name="titleTextStyle">@style/MyTitleStyle</item>
<item name="colorControlNormal">@color/white</item>
</style>
有什麼奇怪的是,加入colorControlNormal改變從disabled_default_text顏色爲白色溢出菜單的顏色,但抽屜切換不會得到改變。任何人都可以弄清楚我做錯了什麼?
什麼'Widget.MyApp.ActionBar'?如果您要創建[MCVE](http://stackoverflow.com/help/mcve),這將有所幫助。 – tachyonflux