Reputation:
I want to change navigation drawer icons, i am trying below code in Menu.xml file. But it showing only black icon.
<?xml version="1.0" encoding="utf-8"?><menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".Welcome"
tools:showIn="navigation_view">
<group android:checkableBehavior="single">
<item
android:id="@+id/nav_kirtan"
android:icon="@drawable/point_red"
android:title="XYZ"/>
</group>
Expected output -
Please help me...!
Upvotes: 0
Views: 1110
Reputation: 1704
Add below line in Activity class...
mNavigationView.setItemIconTintList(null);
Upvotes: 6
Reputation: 101
Try to add color like this :
<item
android:id="@+id/nav_kirtan"
android:icon="@drawable/point_red"
android:title="XYZ"
android:tint="@color/redColor"
/>
or you can also do
mNavigationView.setItemIconTintList(null);
This disables all state based tinting.
Upvotes: 1