我想隐藏一个回收器视图,其中另一个滚动

I want to hide one recycler view where the other one is scrolled

所以,我的屏幕上有两个滚动视图。第一个是水平的,第二个是垂直的。第一个使用线性布局,第二个使用网格布局。如何隐藏第一个动画,而第二个向下滚动。

我试过了recyclerview.onScrollListener。但它没有显示动画,而且滚动看起来很不稳定。我也试过 discrollView 库,但它在这种情况下也不起作用。

请帮帮我。提前致谢。

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

                <androidx.recyclerview.widget.RecyclerView
                    android:layout_below="@id/firstReyclerView"
                    android:id="@+id/secondRecyclerView"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>
                
            </RelativeLayout>
        </androidx.core.widget.NestedScrollView>

并设置 secondRecyclerView.setNestedScrollingEnabled(false);