Horizontal recyclerview with fading edges

前端 未结 1 947
难免孤独
难免孤独 2020-12-09 05:12

If I look at the stackoverflow app\'s horizontal recyclerview, I can see that they use the \"fading edge\" technique so that the user will know that there are items on the l

相关标签:
1条回答
  • 2020-12-09 05:58

    I think the attribute you are looking for is:

    android:requiresFadingEdge="horizontal|vertical"
    

    you can search and better understand this attribute from the recycler view's documentation.

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

    Hopefully this is what you are looking for!

    Cheers

    0 讨论(0)
提交回复
热议问题