About the problem that the itemIconTint selection color of the navigation bar at the bottom of BottomNavigationView has not changed?

problem description

when using BottomNavigationView as the bottom navigation bar, you want to achieve a different color state between selected and unchecked, but do not achieve the desired effect. Click on other sub-items, and the color does not change, so you want to know what the reason is (the first question is a little nervous). Thank you

effect

only the first state selected by default will change the color

related codes

/ / created color resource style.xml code snippet

< selector xmlns:android= " http://schemas.android.com/ap...;>

<item android:color="@android:color/holo_blue_light"
    android:state_checked="true" />
<item android:color="@android:color/black"
    android:state_checked="false"/>

< / selector >

/ / BottomNavigationView code side

   android:id="@+id/navigationview"
    android:layout_width="match_parent"
    android:layout_height="50dp"
    android:background="-sharpfff"
    app:itemIconTint="@color/select"
    android:layout_alignParentBottom="true"
    app:menu="@menu/style">
</android.support.design.widget.BottomNavigationView>
Jun.06,2022

to change color when I use it, I put select into the menu file, like this:


    <item android:state_checked="true" android:drawable="@drawable/svg_tab_bar_find_hl"/>
    <item android:drawable="@drawable/svg_tab_bar_find"/>
</selector>
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e550db-44029.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e550db-44029.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?