0
<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>

Как сделать bottomNavigationBar фиксированным(не исчезающим при прокрутке recyclerview)?

recyclerview находится во фрагменте. И чтобы bottomNavigationBar находился под framelayout и не перекрывал последний элемент recyclerview.

2
  • bottomNavigationBar в разметке этого же фрагмента лежит? 20 июл 2016 в 11:59
  • bottomNavigationBar находится в MainActivity
    – cherry
    20 июл 2016 в 12:03

1 ответ 1

1

Положите главную разметку в корневой RelativeLayout и у container-a выставьте атрибут android:layout_above="@+id/bottom_navigation"

1
  • спасибо)) работает
    – cherry
    20 июл 2016 в 12:41

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.