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?
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 Applications theme like so:
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
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>
Jasmine John
The following worked for me.
<style name="ToolBarStyle" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorControlNormal">@android:color/white</item>
</style>
Put this code in your activity
toggle.getDrawerArrowDrawable().setColor(getResources().getColor(R.color.grey));
来源:https://stackoverflow.com/questions/31626488/change-the-color-of-navigation-drawer-indicator-icon