-2

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.

RANAJEET BARIK
  • 185
  • 2
  • 7
  • 1
    what you want ? Your question is not clear? – A.s.ALI Dec 28 '18 at 05:41
  • 1
    Possible duplicate of [Disable icon colorStateList in NavigationView](https://stackoverflow.com/questions/30621561/disable-icon-colorstatelist-in-navigationview) – Anmol Dec 28 '18 at 06:16
  • Possible duplicate of this [SO Post](https://stackoverflow.com/questions/30621561/disable-icon-colorstatelist-in-navigationview/30632980#30632980) and this [One](https://stackoverflow.com/questions/31394265/navigation-drawer-item-icon-not-showing-original-colour) – hsm59 Dec 28 '18 at 06:27
  • 1
    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 above image. – RANAJEET BARIK Dec 28 '18 at 07:31
  • 1
    Check one of the links posted above, you'll find your answer. To avoid the link its pretty straightforward: `mNavigationView.setItemIconTintList(null);` – hsm59 Dec 28 '18 at 10:50
  • Thank you guys fro your help..It worked. – RANAJEET BARIK Dec 29 '18 at 06:22

1 Answers1

1

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

navigationView.setItemIconTintList(null);

navigationView is your Navigation View Variable

Gourav
  • 2,746
  • 5
  • 28
  • 45