Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change the color of Navigation Drawer indicator icon

I am using a toolbar in place of actionbar and i am also using a navigation drawer.My toolbar colour is black and i want my navigation drawer indicator colour to be white.So how to change the colour of the navigation drawer indicator or put a custom navigation indicator in v7.Can any one please help me?

like image 836
Animesh Jena Avatar asked Jul 25 '15 12:07

Animesh Jena


People also ask

How do I customize my navigation drawer?

Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main. xml. Step 3 − Add the following code to res/layout/nav_header_main.


2 Answers

Try creating this style in your styles.xml.

<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">     <item name="color">@android:color/white</item> </style> 

And, then add it to you AppTheme style like the following.

<item name="drawerArrowStyle">@style/DrawerArrowStyle</item> 
like image 189
Dom Avatar answered Sep 28 '22 17:09

Dom


In your AppTheme add this style.

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="drawerArrowStyle">@style/DrawerArrowStyle</item> </style>  <style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle"> <item name="spinBars">true</item> <item name="color">@android:color/white</item> </style> 

like image 31
Lalit kumar Avatar answered Sep 28 '22 17:09

Lalit kumar