How to change selected item overlay in bottom navigation view?

36 views Asked by At

I want to change the color of the overlay of the selected item in a nav bar. what I want to change I don't want to change the color of the item itself, but the color of the shape on it (in purple on the image). As it is a new way of Android to display the nav bar, I couldn't find anything working online. Here is the code for my navbar:

<com.google.android.material.bottomnavigation.BottomNavigationView
        android:id="@+id/bottomNavigationView"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:backgroundTint="@color/colorPrimaryDark"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:labelVisibilityMode="selected"
        app:menu="@menu/bottom_menu" />

I already tried to modify values in theme.xml, and used some attributes in the layout file. Nothing could change the color of the overlay.

0

There are 0 answers