你只需要添加属性requiresFadingEdge,如果想指定透明度的长度,可以添加另一个属性fadingEdgeLength。
祝你的项目好运。<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:requiresFadingEdge="horizontal"
android:fadingEdgeLength="20dp">
</android.support.v7.widget.RecyclerView>