How to remove the shadow effect and the RecyclerView Halo when sliding controls such as recyclerview to the edge
By default, slide controls such as RecyclerView have scroll bars and shadow effects when sliding to the edge. How can we remove these two default attributes? Here is a brief introduction.
Scroll bar Effect
1. Set Through xml file
Android: scrollbars = "" has three attributes.
A. none: remove the scroll bar.
B. horizontal: sets the horizontal scroll bar.
C. vertical: Set the vertical scroll bar.
2. Set Through java code
A. RecyclerView. setHorizontalScrollBarEnabled (boolean horizontalScrollBarEnabled );
B. RecyclerView. setVerticalScrollBarEnabled (boolean verticalScrollBarEnabled );
If it is set to true, a corresponding scroll bar is displayed. If it is set to false, no corresponding scroll bar is rolled to the halo of the edge.
1. Set Through xml file
Android: overScrollMode = "" has three attributes.
A. none: remove the halo effect.
B. always: always set the halo effect.
C. ifContentScrolls: set this mode. If the content in the recycleview can slide, an arc Halo will appear when sliding to the boundary. If the content in the recycleview cannot slide, then, after sliding to the boundary, the arc Halo will not appear.
2. Set Through java code
A. RecyclerView. setOverScrollMode (View. OVER_SCROLL_NEVER) is set to none in the same xml format.
B. RecyclerView. setOverScrollMode (View. OVER_SCROLL_ALWAYS) is set to always in the same xml format.
C. RecyclerView. setOverScrollMode (View. OVER_SCROLL_IF_CONTENT_SCROLLS) Complete xml code that is set to ifContentScrolls while removing the scroll bar and default halo effects.