Custom icon for unselected item in bottom navigation android
Hi I am trying to create a bottom navigation bar that looks like this,
The issue is that central button with the plus sign, I know how to create the bottom navigation without that button, but the button is necessary and it shuld always be red no matter whether its selected or not.
Below is my nav_menu in the menu folder
<?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/home_item" android:icon="@drawable/home" android:title="@string/dashboard"/> <item android:id="@+id/payment_item" android:icon="@drawable/payment" android:title="@string/payment"/> <item android:id="@+id/add_item" android:icon="@drawable/ic_add_icon" android:checked="true" android:iconTint="@color/colorRed" android:title=""/> <item android:id="@+id/settings_item" android:icon="@drawable/settings" android:title="@string/settings"/> <item android:id="@+id/navigation_albums" android:icon="@drawable/profile" android:title="@string/profile"/> </menu>
This is my bottomsheet in the activity
<com.google.android.material.bottomnavigation.BottomNavigationView android:id="@+id/bottom_nav" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginEnd="0dp" android:layout_marginStart="0dp" android:paddingTop="12dp" android:paddingBottom="12dp" android:background="@color/colorWhite" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:itemBackground="@color/colorPrimary" android:textColor="@color/nav_color_types" app:itemIconTint="@color/nav_color_types" app:itemTextColor="@color/nav_color_types" app:menu="@menu/nav_menu"/>