public abstract class

RecyclerView.OnFlingListener

extends java.lang.Object

 java.lang.Object

↳androidx.recyclerview.widget.RecyclerView.OnFlingListener

Subclasses:

LinearSnapHelper, SnapHelper, PagerSnapHelper

Overview

This class defines the behavior of fling if the developer wishes to handle it.

Subclasses of RecyclerView.OnFlingListener can be used to implement custom fling behavior.

Summary

Constructors
publicOnFlingListener()

Methods
public abstract booleanonFling(int velocityX, int velocityY)

Override this to handle a fling given the velocities in both x and y directions.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public OnFlingListener()

Methods

public abstract boolean onFling(int velocityX, int velocityY)

Override this to handle a fling given the velocities in both x and y directions. Note that this method will only be called if the associated RecyclerView.LayoutManager supports scrolling and the fling is not handled by nested scrolls first.

Parameters:

velocityX: the fling velocity on the X axis
velocityY: the fling velocity on the Y axis

Returns:

true if the fling was handled, false otherwise.