答案 0 :(得分:11)
以下适用于我的ToolBar
:
<style name="MyTheme" parent="Theme.AppCompat">
<item name="drawerArrowStyle">@style/MyDrawerArrowToggle</item>
</style>
<style name="MyDrawerArrowToggle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="color">@color/your_color</item>
</style>
<style name="ToolbarThemeWhite" parent="@style/ThemeOverlay.AppCompat.ActionBar">
<item name="colorControlNormal">@color/white</item>
<item name="android:textColorPrimary">@color/white</item>
</style>
将此样式设置为工具栏
答案 1 :(得分:1)
以下代码示例为我工作
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" >
<item name="android:windowContentOverlay">@null</item>
<!--below line used to change the color of home(back) button color-->
<item name="colorControlNormal">@color/red</item>
</style>
答案 2 :(得分:0)
尝试这个:
<style name="MyMaterialTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
<item name="android:textColor">@color/colorAccent</item>
</style>
<style name="DrawerArrowStyle" parent="@style/Widget.AppCompat.DrawerArrowToggle">
<item name="spinBars">true</item>
<item name="color">@color/colorPrimaryDark</item>
</style>
<activity android:name=".MainActivity"
android:theme="@style/MyMaterialTheme.Base"></activity>