Я пытался использовать свою руку с recyclerview и плавающей кнопкой действия для приложения. Проблема, с которой я столкнулся, заключается в том, что кнопка с плавающим действием препятствует кнопкам в recyclerview. Я посмотрел, как приложения для Android, такие как приложение для телефона (одно из которых у вас есть контакты, отображаемые в gridvew), предназначены для решения этой проблемы, я вижу, что в нижней части находится пустое пространство, которое дает пространство между recyclerview и кнопкой плавающего действия, пользователь просто нужно прокрутить вниз, чтобы избежать перекрытия. Я попытался добавить представление после recyclerview, но не его не отображалось, также это представление должно перемещаться вместе со строками recyclerview. Что мне не хватает, чтобы показать представление в конце recyclerview. Мой файл макета:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#6fbababa">
<android.support.v7.widget.RecyclerView
android:id="@+id/my_recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical"/>
<ImageButton
android:id="@+id/button_floating_action"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:src="@drawable/ic_fab"
android:background="@null"
android:layout_alignParentBottom="true"
android:layout_marginBottom="12dp"
android:layout_marginEnd="12dp"
android:layout_marginRight="12dp"
android:elevation="2dp"/>
<View
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_below="@id/my_recycler_view"
android:background="@color/white"/>
</RelativeLayout>
Обновление: Изменен код макета, чтобы он работал.
<android.support.v7.widget.RecyclerView
android:id="@+id/my_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:paddingBottom="30dp"
android:scrollbars="vertical"/>