Remove RecyclerView scroll effects

AndroidScrollEffectAndroid Recyclerview

Android Problem Overview


I have two RecyclerView inside my NavigationDrawer. Both have the blue scroll effects.

How can I remove this effect in both RecyclerViews?

I tried changing: mRecyclerView.setHasFixedSize(true); to false, but it remove scroll effects. (What is the effect of this method?)

Link to an image of the problem

Android Solutions


Solution 1 - Android

Add this to your layout:

android:overScrollMode="never"

So:

<android.support.v7.widget.RecyclerView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:overScrollMode="never"
    android:background="#FFFFFF"
    android:scrollbars="vertical" />

Solution 2 - Android

And in Java you would do

recyclerView.setOverScrollMode(View.OVER_SCROLL_NEVER)

or in Kotlin

recyclerView.overScrollMode = View.OVER_SCROLL_NEVER

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJavierSegoviaCordobaView Question on Stackoverflow
Solution 1 - AndroidmmloolooView Answer on Stackoverflow
Solution 2 - AndroidAlgarView Answer on Stackoverflow