I have a pink gap between the bottom navigation bar and the action bar:
This is the bottom navigation bar xml:
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottomNavigationView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:backgroundTint="@drawable/nav_item_background_selector"
app:itemActiveIndicatorStyle="@color/white"
app:itemBackground="@drawable/nav_item_background_selector"
app:itemIconTint="@drawable/nev_item_select"
app:itemTextColor="@drawable/nev_item_select"
app:labelVisibilityMode="labeled"
app:layout_constraintBottom_toBottomOf="parent"
app:menu="@menu/bottom_nav" />
This is the themes xml:
<style name="Base.Theme.MyApp" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Customize your light theme here. -->
<item name="colorPrimary">@drawable/card_gradients</item>
<item name="colorPrimaryDark">@drawable/card_gradients</item>
<item name="colorAccent">@color/white</item>
<item name="android:statusBarColor">@drawable/card_gradients</item>
<item name="android:windowFullscreen">false</item>
</style>
nev_item_select
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:color="@color/darkBlue"/>
<item android:state_checked="false" android:color="@color/lightGray"/>
</selector>
nav_item_background_selector:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:drawable="@color/white"/>
<item android:state_checked="false" android:drawable="@color/white"/>
</selector>
issue was app:backgroundTint="@drawable/nav_item_background_selector"
I change it to app:backgroundTint="@color/white"
now its fixed. If you are using dark mode default this get system color.