Как добавить затухающую кромку только внизу Scrollview / Recyclerview? - PullRequest
0 голосов
/ 18 июня 2020

enter image description here Я использую requiresFadingEdge=true для добавления эффекта затухания внизу, но проблема в том, что он также показывает эффект затухания вверху? Как отключить эффект затухания вверху при прокрутке вниз?

Я прикрепил снимок экрана внизу.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:background="@color/grey">
  <android.support.v7.widget.RecyclerView
        android:id="@+id/list_recyclerview"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingBottom="?attr/actionBarSize"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:spanCount="2"
        tools:itemCount="14"
        tools:layoutManager="android.support.v7.widget.GridLayoutManager"
        tools:listitem="@layout/layout_thermal_grid" />

 <View
        android:layout_width="match_parent"
        android:layout_height="@dimen/pad_150dp"
        android:layout_alignParentBottom="true"
        android:requiresFadingEdge="vertical"
        android:layout_marginBottom="@dimen/pad_50dp"
        android:fadeScrollbars="true"
        android:fadingEdgeLength="@dimen/pad_120dp"></View>


</RelativeLayout>
...