Navigation drawer item icon not showing original colour

I found the answer here: https://stackoverflow.com/a/30632980/875249

To avoid the link its pretty straightforward:

    mNavigationView.setItemIconTintList(null);

This disables all state based tinting, but you can also specify your own list too. It worked great for me!

Here is where you can get the details on creating a color state list, but its pretty simple too:
http://developer.android.com/reference/android/content/res/ColorStateList.html

    <selector xmlns:android="http://schemas.android.com/apk/res/android">
        <item android:state_checked="true" android:color="@color/primary" />
        <item android:state_checked="false" android:color="@android:color/white" />
    </selector>

Leave a Comment