aurelhubert / ahbottomnavigation

A library to reproduce the behavior of the Bottom Navigation guidelines from Material Design.
3.84k stars 683 forks source link

Separate Icon/Drawable for selected & inactive state #406

Open yasirebricks opened 5 years ago

yasirebricks commented 5 years ago

Is there any way to choose different icons/drawables for selected & inactive state instead of applying tint color on same drawable for both states?

omarmiatello commented 5 years ago

You could add in drawable folder for example the file ic_tab_user_selector.xml

<?xml version="1.0" encoding="utf-8"?>

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/ic_tab_user_selected" android:state_selected="true" />
    <item android:drawable="@drawable/ic_tab_user_normal" />
</selector>