I'm trying to add a new item to the bottom navigation bar of one of my apps, but for some reason when i add the XML for the new item the titles of all un-clicked items dissapear.
Here is the XML before adding the new item
<item
android:id="@+id/navigation_lessons"
android:icon="@drawable/ic_nav_lessons"
android:title="@string/lessons" />
<item
android:id="@+id/navigation_simulator"
android:icon="@drawable/ic_nav_simulator"
android:title="@string/simulator" />
<item
android:id="@+id/navigation_quiz"
android:icon="@drawable/ic_nav_quiz"
android:title="@string/quiz" />
but after adding the new item to the XML
<item
android:id="@+id/navigation_lessons"
android:icon="@drawable/ic_nav_lessons"
android:title="@string/lessons" />
<item
android:id="@+id/navigation_simulator"
android:icon="@drawable/ic_nav_simulator"
android:title="@string/simulator" />
<item
android:id="@+id/navigation_quiz"
android:icon="@drawable/ic_nav_quiz"
android:title="@string/quiz" />
<item
android:id="@+id/navigation_settings"
android:icon="@drawable/ic_nav_settings"
android:title="@string/settings" />
The bottom nav bar looks like this
I am using some custom colors & styles but i don't change anything in those before & after adding a new item. im going to share my style & colors anyway though
This is the style
<style name="ThemeOverlay.Custom.BottomNavigationView" parent="Widget.MaterialComponents.BottomNavigationView">
<item name="itemTextColor">@color/bottom_nav_light</item>
<item name="itemIconTint">@color/bottom_nav_light</item>
<item name="itemBackground">@color/colorPrimary</item>
</style>
And here is the color
<item android:state_checked="true" android:color="#000000" />
<item android:state_checked="false" android:color="#595959"/>
I tries changing the title color programmatically but couldn't get anywhere, does anyone have an idea of what could be causing this?