There is a RecyclerView . The problem is that usually when reaching the beginning or the end of the list there is an effect, as if the list by inertia moves on literally a couple of millimeters and immediately falls into place. As if bouncing. This effect is standard, lasts less than a second and is available everywhere where there is at least some screen scrolling. However, it is missing from me in these RecyclerView . Please help in solving this problem.

UPD:

1. Link to the video where you can see this effect below. Please note that this is not about the overScrollMode effect.

2. An important addition that the effect appears if the list is not brought to the end with a finger, but as if to push it so that it moves by inertia and reaching the end (or the beginning), this effect of jumping or springing the list will appear))

  • Perhaps, third-party lib for you are suitable for this: github.com/EverythingMe/overscroll-decor - Yuriy SPb
  • @YuriSPb, thanks for the proposed option. But it would be desirable without third-party libraries. After all, this is quite a standard behavior ... - Gamlet
  • This is a standard on iPhones. In Android, only third-party means are possible. - JuriySPb
  • one
    Maybe you have some sort of Xiaomi with their MiUI or Meizu, on which this can be a standard. In pure android, there is no bouncing effect, which means it will not work by standard means. This is the third person you are talking about. - eugeneek
  • one
    @Gamlet This is the standard effect for ListView . In RecyclerView from him, apparently, refused. - eugeneek

1 answer 1

You are probably confusing something - in the standard Android there is no bounce effect , there is an overscroll concept, when you reach the beginning / end of the list above / below this strip appears ( overscroll edge effect ):

enter image description here

Overscroll can be controlled a little bit, the attribute RecyclerView/ScrollView - android:overScrollMode="always/never" is responsible for this android:overScrollMode="always/never" with different flags

If you really want to bounce effect , then here only to third-party libs, well, or write the animation itself.

An excellent lib is this one - you embed it into a layout, something like:

 <com.chauthai.overscroll.RecyclerViewBouncy android:id="@+id/recyclerView" android:layout_width="match_parent" android:layout_height="wrap_content"/> 
  • Unfortunately, this is not about overScrollMode , this is exactly the effect, the name of which I do not know. But it looks very similar to your example from the link, only it happens very, very quickly. I did not even notice him before, until I saw his absence. It is, and this is exactly the standard behavior when scrolling through something. - Gamlet
  • Please see addition to my question. I threw the link to the video there. Perhaps it will be clearer what it is about. - Gamlet
  • I did not see such an effect on Android - well, honestly ... you speak apparently about the effect that was implemented on some kind of special. firmware or shell. There is no such thing in the standard ... - Barmaley
  • Okay, I could be wrong, but when dear people tell you @ YuriSPb and eugeneek in chorus - I would have thought about it - Barmaley