Selected tab's color in Bottom Navigation View
<p>I'm adding a <code>BottomNavigationView</code> to a project, and I would like to have a different text (and icon tint) color for the selected tab (to achieve greying out non-selected tabs effect). Using a different color with <code>android:state_selected="true"</code> in a color selector resource file doesn't seem to work. I also tried having additional item entries with <code>android:state_focused="true"</code> or <code>android:state_enabled="true"</code>, no effect unfortunately. Also tried setting the <code>state_selected</code> attribute to false (explicitly) for the default (non-selected) color, with no luck.</p>

<p>Here is how I add the view to my layout:</p>

<pre><code>&lt;android.support.design.widget.BottomNavigationView
        android:id="@+id/bottom_navigation"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        app:itemBackground="@color/silver"
        app:itemIconTint="@color/bnv_tab_item_foreground"
        app:itemTextColor="@color/bnv_tab_item_foreground"
        app:menu="@menu/bottom_nav_bar_menu" /&gt;
</code></pre>

<p>Here is my color selector (<code>bnv_tab_item_foreground.xml</code>):</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
    &lt;item android:color="@android:color/darker_gray"  /&gt;
    &lt;item android:state_selected="true" android:color="@android:color/holo_blue_dark" /&gt;
&lt;/selector&gt;
</code></pre>

<p>And my menu resource (<code>bottom_nav_bar_menu.xml</code>):</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;menu xmlns:android="http://schemas.android.com/apk/res/android"&gt;

    &lt;item
        android:id="@+id/action_home"
        android:icon="@drawable/ic_local_taxi_black_24dp"
        android:title="@string/home" /&gt;
    &lt;item
        android:id="@+id/action_rides"
        android:icon="@drawable/ic_local_airport_black_24dp"
        android:title="@string/rides"/&gt;
    &lt;item
        android:id="@+id/action_cafes"
        android:icon="@drawable/ic_local_cafe_black_24dp"
        android:title="@string/cafes"/&gt;
    &lt;item
        android:id="@+id/action_hotels"
        android:icon="@drawable/ic_local_hotel_black_24dp"
        android:title="@string/hotels"/&gt;

&lt;/menu&gt;
</code></pre>

<p>I would appreciate any help.</p>