This topic was raised 5 years ago: How to enable BottomNavigationView's shifting mode
The problem is that it suggests using libs.design versions 27-28, but when adding this dependency and removing libs.material in build.gradle(app) I get an error message about duplicate dependencies. I only found that shift mode can be disabled, because when using the BottomNavigationView, it is enabled by default and should already be working. But for some reason it doesn't work in my case.
In general, tell me how to do this. .gif from this .gif
there is such an XML file
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_nav"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:menu="@menu/menu_main"/>