Three alternative ways to try, I don't know if they work:
1 - Place the BottomNavigationView outside of the CoordinatorLayout, nesting everything in a RelativeLayout and setting the marginBottom for the CoordinatorLayout (as an example library:
android:layout_marginBottom="@dimen/bottom_navigation_height "
)
2 - Save the BottomNavigationView view inside CoordinatorLayout, but using the FrameLayout parameter (CoordinatorLayout is FrameLayout)
android:layout_gravity
instead
android:layout_alignParentBottom
(this is a RelativeLayout parameter). You should also add marginBottom to the main content.
3 - Better if it works. Save the BottomNavigationView view inside the CoordinatorLayout by removing android:layout_alignParentBottom and trying to give it a description of the BottomSheetBehavior, as the design library reports
app:behavior_peekHeight="XXdp" app:layout_behavior="android.support.design.widget.BottomSheetBehavior"
PeekHeight XX should be the height of the BottomNavigationView, you should also add marginBottom to the main content.
source share