Search code examples
androidandroid-actionbarnavigation-drawer

Android studio navigation drawer icon color


All my fragments use red action bar, so white navigation drawer icon looks good. But for one fragment I need white action bar and drawer icon not visible. So I have to change drawer icon to red. But I can't find how to do this.

How to change icon to red color?enter image description here


Solution

  • Create style like this for your required activity styles.xml

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

    And then add it to you Activity theme like this:

    <item name="drawerArrowStyle">@style/DrawerArrowStyle</item>