我无法在 recyclerview 上显示浮动操作菜单

I can't display floating action menu on recyclerview

我想在 Recyclerview 上显示浮动操作菜单 object.I 有一节课 activity 显示到已保存的课程。我想添加包含 2 个选择的浮动操作按钮。当我添加新数据时,如果 recylverview object 没有数据,我的浮动操作菜单工作正常,但是当 recyclerview 已满时,它不像页面底部的图片那样工作。我能做些什么来解决这个问题?

<RelativeLayout 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"
    android:layout_gravity="center"
    android:background="@drawable/bg_login"
    tools:context=".MainActivity">

        <com.github.clans.fab.FloatingActionMenu
            android:id="@+id/floatingActionMenu"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_alignParentEnd="true"
            android:layout_alignParentRight="true"
            android:layout_margin="16dp"
            app:menu_backgroundColor="@android:color/transparent"
            app:menu_fab_label=""
            app:menu_openDirection="up"
            app:menu_showShadow="true">

            <com.github.clans.fab.FloatingActionButton
                android:id="@+id/floatingAddButtonLesson"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:fab_label="Ders Ekle"
                app:fab_size="mini"
                app:srcCompat="@drawable/ic_add"
                tools:ignore="VectorDrawableCompat" />

            <com.github.clans.fab.FloatingActionButton
                android:id="@+id/floatingAddButtonLesson2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:fab_label="Toplam Kaç Soru Çözdüm"
                app:fab_size="mini"
                app:srcCompat="@drawable/ic_add"
                tools:ignore="VectorDrawableCompat" />


        </com.github.clans.fab.FloatingActionMenu>

    <androidx.recyclerview.widget.RecyclerView
        android:layout_width="match_parent"
        android:id="@+id/rvLesson"
        android:layout_height="wrap_content"/>
</RelativeLayout>

你只需要把FloatingActionMenu放在RecyclerView下面,然后FloatingActionMenu就会显示在RecyclerView

上面
<RelativeLayout 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"
    android:layout_gravity="center"
    android:background="@drawable/bg_login"
    tools:context=".MainActivity">

        <androidx.recyclerview.widget.RecyclerView
            android:layout_width="match_parent"
            android:id="@+id/rvLesson"
            android:layout_height="wrap_content"/>

        <com.github.clans.fab.FloatingActionMenu
            android:id="@+id/floatingActionMenu"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_alignParentEnd="true"
            android:layout_alignParentRight="true"
            android:layout_margin="16dp"
            app:menu_backgroundColor="@android:color/transparent"
            app:menu_fab_label=""
            app:menu_openDirection="up"
            app:menu_showShadow="true">

            <com.github.clans.fab.FloatingActionButton
                android:id="@+id/floatingAddButtonLesson"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:fab_label="Ders Ekle"
                app:fab_size="mini"
                app:srcCompat="@drawable/ic_add"
                tools:ignore="VectorDrawableCompat" />

            <com.github.clans.fab.FloatingActionButton
                android:id="@+id/floatingAddButtonLesson2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:fab_label="Toplam Kaç Soru Çözdüm"
                app:fab_size="mini"
                app:srcCompat="@drawable/ic_add"
                tools:ignore="VectorDrawableCompat" />


        </com.github.clans.fab.FloatingActionMenu>

</RelativeLayout>