具有角半径背景的 Recyclerview

时间:2021-07-18 17:56:21

标签: android android-recyclerview background rounded-corners

我正在使用带圆角的回收视图(使用带有圆角半径的可绘制对象作为背景)这是我的代码:

            <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/rv"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:overScrollMode="never"
            android:clipChildren="true"
            android:background="@drawable/bg_rounded_background"
            android:layout_marginBottom="@dimen/margin_16dp"
            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:reverseLayout="true"
            app:stackFromEnd="false" /> 

现在我期待 recyclerview 的项目滚动到角落下方,但结果是这样的:

enter image description here

我正在寻找一种方法,如何使项目在褪色时滚动到圆角半径以下,有什么提示吗?和建议?

0 个答案:

没有答案