Skip to content

Most visited

Recently visited

navigation

RecyclerView.OnFlingListener

public static abstract class RecyclerView.OnFlingListener
extends Object

java.lang.Object
   ↳ android.support.v7.widget.RecyclerView.OnFlingListener
Known Direct Subclasses
Known Indirect Subclasses


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.

See also:

Summary

Public constructors

RecyclerView.OnFlingListener()

Public methods

abstract boolean onFling(int velocityX, int velocityY)

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

Inherited methods

From class java.lang.Object

Public constructors

RecyclerView.OnFlingListener

RecyclerView.OnFlingListener ()

Public methods

onFling

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 int: the fling velocity on the X axis
velocityY int: the fling velocity on the Y axis
Returns
boolean true if the fling washandled, false otherwise.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.