2014-12-03 22 views
2

我正在使用Toolbar+NavigationDrawerTheme.AppCompat如何使用Theme.AppCompat時更改DrawerArrow顏色

這裏是我的style.xml:

<style name="BlueTheme" parent="Theme.AppCompat.Light.NoActionBar"> 
    <item name="drawerArrowStyle">@style/BlueTheme.DrawerArrowStyle</item> 
    <item name="colorPrimary">@color/primary</item> 
    <item name="colorAccent">@color/accent</item> 
    <item name="colorPrimaryDark">@color/primaryDark</item> 
</style> 

<style name="BlueTheme.DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle"> 
    <item name="color">@android:color/white</item> 
</style> 

drawer arrow still has a alpha and is not solid white.

像這樣:

ScreenShot

(對不起,我沒有足夠的聲譽發表圖片)

看來,drawerArrowStyle屬性不工作,我不知道如果我犯了一些錯誤。我可以做change the DrawerToggler to solid white?

什麼(PS:當我使用origin ActionBar It works right,東西變成錯誤的,當我更換動作條到工具欄)

(請原諒我的英語不好......)

回答

-1

here下工具欄小工具標題 - 造型字幕。

1

我知道這是舊的,但我只是遇到了同樣的問題。
您是否在佈局xml中設置自定義工具欄主題?
你必須使用app:theme代替android:theme

即使drawerArrowStyle在應用主題設定,沒有動作條的主題,它沒有,而我有工具欄的android:theme屬性設置工作。
一旦我將其更改爲app:theme,它就像記錄文件一樣開始工作。

+0

這是關鍵。 android:主題似乎適用於L,但對於JellyBean,我不得不切換到app:主題 – 2015-03-13 21:53:34