-2

I have integrated a toolbar into main activity ,now I want to change a color of icon berger and background color of item menu :

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent" android:layout_height="wrap_content"
    android:id="@+id/toolbar"
    android:fitsSystemWindows="true"
    android:theme="@style/toolbar"
    app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

</android.support.v7.widget.Toolbar>

and the style file is :

<resources>

    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>
</resources>
Bourbia Brahim
  • 14,459
  • 4
  • 39
  • 52
Mohamed Mellal
  • 49
  • 1
  • 12
  • Possible duplicate of [How to change color of hamburger icon in material design navigation drawer](http://stackoverflow.com/questions/31870132/how-to-change-color-of-hamburger-icon-in-material-design-navigation-drawer) – Mayur Gangurde Feb 22 '17 at 11:53

1 Answers1

3

Try using this :

 <?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent" 
    android:layout_height="wrap_content"
    android:id="@+id/toolbar"
    android:fitsSystemWindows="true"
    app:theme="@style/backArrowTheme"
    app:popupTheme="@style/AppTheme"
   >    
</android.support.v7.widget.Toolbar>


<style name="backArrowTheme" parent="AppTheme">
    <item name="android:textColorSecondary">Hexcode of color</item>
</style>
Bourbia Brahim
  • 14,459
  • 4
  • 39
  • 52
User6006
  • 597
  • 4
  • 21