Horizontal recirculation with fading edges

If I look at the horizontal recyclerview of the stackoverflow application, I see that they use the β€œfading edge” technique so that the user knows that there are elements to the left and right of the recyclerview, and they can scroll.

stackoverflow

On the list, I think this effect is enabled by calling below as described by Romain Guy ( http://www.curious-creature.com/category/android/page/2/ ):

Android: cacheColorHint = "# 00000000"

There is no such option in Recyclerview unfort. Is there a built-in method to use these fading edges for recyclerview or should it just be a hack?

+6
source share
1 answer

I think the attribute you are looking for is:

android:requiresFadingEdge="horizontal|vertical" 

You can search and better understand this attribute from the recycler documentation view.

The other attribute you're talking about, 'cacheColorHint' , can be used to match the attenuation color with the background color. This attribute is the color on which the list view is drawn, and is defined as an opaque color , because you do not always have a white background (I think this is the default color ... but I'm not sure), the best option is to use a transparent color "# 00000000" as suggested by Romain Guy.

Hope this is what you are looking for!

Greetings

+14
source

All Articles