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
  • 151,199
  • 17
  • 111
  • 216
tomss
  • 251
  • 2
  • 12

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
  • 11,436
  • 3
  • 24
  • 35
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
  • 7,700
  • 8
  • 45
  • 82