How make RecyclerView
item disappear smoothly when it is going out of list border? See image below. All possible solutions highly appreciated!
Note: Solution with View
above RecyclerView
which has gradient background (shadow imitation) does not work well because I have gradient background on screen and it is difficult to match that "shadow" view background to screen background and it look like that:
So, works like shadow not like disappearance.
UPDATED: Got the second screen with following background:
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<gradient
android:type="linear"
android:startColor="#FF14141d"
android:endColor="#0014141d"
android:angle="270"/>
</shape>
Here is original screen background
if you want to fade edges, you can use:
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:requiresFadingEdge="vertical" <-- this line
android:fadingEdgeLength="150dp" <-- this line, the height of fade
/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With