0

I want to know if it is possible to use my own icons on NavigationView items. enter image description here

I tried to replace google icons to my own icons (drawable resources), but a square appears instead of my icons.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
tomss
  • 361
  • 3
  • 13

2 Answers2

1

After applying your own icons to the menu which is populated in Navigation Drawer, just add following piece of code in Activity.java file after initiating Nav drawer like

  NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
  navigationView.setItemIconTintList(null);
Rajan Kali
  • 12,627
  • 3
  • 25
  • 37
0

Yes, you can. Look at this Answer

initImageLoader(this);
NavigationView navigationView = (NavigationView) findViewById(R.id.navigation);
ImageView imageView = (ImageView)navigationView.getHeaderView(0).findViewById(R.id.ivHeader);
ImageLoader.getInstance().displayImage("YourImageUrl", imageView);
Community
  • 1
  • 1
Kingfisher Phuoc
  • 8,052
  • 9
  • 46
  • 86