I'm trying to limit the fling speed of the recycleview
.
I see RecycleView
has this method:
public boolean fling(int velocityX, int velocityY) {
...
}
However this deals with an internal private class ViewFlinger
. Not to mention only called once with the initial velocities.
I also noticed there's an OnFlingListener
which has both arguments: velocityX
, velocityY
. If you set this and return true from the method, fling wont work at all:
recycleView.setOnFlingListener(new RecyclerView.OnFlingListener() {
@Override
public boolean onFling(int velocityX, int velocityY) {
return true;
}
});
But this is not what I want. I want neither.
I'd like to cap the top speed of the fling but still keep it going.
Any ideas how to solve this?