I want to input my customized icon into the menu in navigation drawer. However, when I run the application it only display a shadow of icon. How do I show the image correctly?
It works now by removing the tint effect from icon by setItemIconTintList(null)
. Put the line of code below under the navigationView
.
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setItemIconTintList(null);
navigationView.setNavigationItemSelectedListener(this);
Did you try to change to another image to see if it is displaying?
<item name="ic_recent_picture" type="drawable">@mipmap/ic_recent</item>
Path @mipmap contains correct image?
if you still haven't solved the problem by removing the tint, you might want to move your resource file to drawable (use Poject View) instead of drawable-anydpi like I did