3

How to change back button color in ActionBar? (From black to white color). It's screenshot with this button:

enter image description here

And how to change spinner arrow color on ActionBar?

pnuts
  • 56,678
  • 9
  • 81
  • 133
Artem
  • 4,421
  • 10
  • 39
  • 83

3 Answers3

13

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>

EDIT


Option 2

<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

N J
  • 26,829
  • 13
  • 75
  • 94
  • and how to change spinner arrow color? (Your answer is correct!) – Artem Sep 29 '15 at 07:36
  • 1
    see this link http://stackoverflow.com/questions/27551230/android-theme-appcompat-light-with-dark-toolbar-for-light-text – N J Sep 29 '15 at 07:44
  • this isn't changing anything on android 5 and 6 devices. Can you please check? – onexf Oct 13 '16 at 07:50
2

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>
Kishor N R
  • 1,451
  • 1
  • 16
  • 21
1

Try to this :

enter image description here !Change Menu color in Navigation

In style.xml :

<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>

In Mainfests.xml:

<activity android:name=".MainActivity"
        android:theme="@style/MyMaterialTheme.Base"></activity>
Boken
  • 4,062
  • 9
  • 31
  • 41
Sumit Saxena
  • 317
  • 3
  • 8