<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/linear_layout1" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context="com.example.akmaral.application.MainActivity"> <include android:id="@+id/bar" android:layout_width="match_parent" android:layout_height="wrap_content" layout="@layout/appbarlayout"/> <FrameLayout android:layout_marginBottom="1dp" android:id="@+id/container" android:layout_width="match_parent" android:layout_height="wrap_content" /> <com.aurelhubert.ahbottomnavigation.AHBottomNavigation android:id="@+id/bottom_navigation" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" /> </android.support.design.widget.CoordinatorLayout> 

How to make bottomNavigationBar fixed (not disappearing when scrolling by recyclerview )?

recyclerview is in fragment. And so that bottomNavigationBar under the framelayout and does not overlap the last element of recyclerview .

  • bottomNavigationBar in the markup of the same fragment lies? - Android Android
  • bottomNavigationBar is located in MainActivity - cherry

1 answer 1

Put the main markup in the root RelativeLayout and set the android:layout_above="@+id/bottom_navigation" attribute for container-a android:layout_above="@+id/bottom_navigation"

  • thanks)) works - cherry