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
  • 58,317
  • 11
  • 87
  • 139
Artem
  • 4,569
  • 12
  • 44
  • 86

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
  • 27,217
  • 13
  • 76
  • 96
  • 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,521
  • 1
  • 17
  • 23
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,825
  • 10
  • 32
  • 42
Sumit Saxena
  • 335
  • 3
  • 8