Reputation: 4639
How to change back button color in ActionBar
? (From black to white color).
It's screenshot with this button:
And how to change spinner arrow color on ActionBar
?
Upvotes: 3
Views: 14518
Reputation: 364
Try to this :
<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>
Upvotes: 1
Reputation: 1591
following code sample worked for me
<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>
Upvotes: 2
Reputation: 27505
The following works for me with 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>
set this style to toolbar
Upvotes: 13