Reputation: 371
I want to know if it is possible to use my own icons on NavigationView items.
I tried to replace google icons to my own icons (drawable resources), but a square appears instead of my icons.
Upvotes: 0
Views: 455
Reputation: 8200
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);
Upvotes: 0
Reputation: 12953
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);
Upvotes: 1