Android-места просмотров под BottomAppBar - PullRequest
0 голосов
/ 28 августа 2018

Я хочу сделать очень простую раскладку. Один RecyclerView, один EditText, один BottomAppBar без FloatingActionButton. Но я не могу понять, как разместить свои представления под BottomAppBar?

Что у меня есть:

<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent>

 <androidx.core.widget.NestedScrollView
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     app:layout_anchor="@id/bar"
     app:layout_anchorGravity="top">

     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:orientation="vertical">
         <androidx.recyclerview.widget.RecyclerView
             android:id="@+id/recyclerView"
             android:layout_width="match_parent"
             android:layout_height="match_parent"/>

         <EditText
             android:id="@+id/editText"
             android:layout_width="match_parent"
             android:layout_height="wrap_content" />
     </LinearLayout>
 </androidx.core.widget.NestedScrollView>   

    <com.google.android.material.bottomappbar.BottomAppBar
        android:id="@+id/bar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:backgroundTint="@color/colorPrimary"
        app:hideOnScroll="true"
        app:navigationIcon="@drawable/baseline_menu_white_24" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>

Что я хочу: example Возможно ли это?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...