Search code examples
androidnavigation-drawernavigationviewandroid-navigationview

How to set these kind of colored icon in navigation view of drawer layout


Want to achieve colored icons in the navigation drawer as in the image below.

enter image description here

When I add icons in my navigation view menu automatically it becomes grey.How can I make the icons as its previous colored state like the below image.


Solution

  • Add the following line after you have initialised Drawer Layout and Navigation View:

    navigationView.setItemIconTintList(null);
    

    navigationView is your Navigation View Variable