Change the color of Navigation Drawer indicator icon

后端 未结 4 1387
难免孤独
难免孤独 2020-12-23 19:52

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

相关标签:
4条回答
  • 2020-12-23 20:03

    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>
    

    0 讨论(0)
  • 2020-12-23 20:09

    The following worked for me.

     <style name="ToolBarStyle" parent="Theme.AppCompat.Light.NoActionBar">
                <item name="colorControlNormal">@android:color/white</item>
            </style>
    
    0 讨论(0)
  • 2020-12-23 20:14

    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>
    
    0 讨论(0)
  • 2020-12-23 20:21

    Put this code in your activity

    toggle.getDrawerArrowDrawable().setColor(getResources().getColor(R.color.grey));
    
    0 讨论(0)
提交回复
热议问题