Artem
Artem

Reputation: 4639

Change color on back button (on ActionBar)

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?

Upvotes: 3

Views: 14518

Answers (3)

Sumit Saxena
Sumit Saxena

Reputation: 364

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>

Upvotes: 1

Kishor N R
Kishor N R

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

N J
N J

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>

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

Upvotes: 13

Related Questions