RecyclerView.OnFlingListener
public
static
abstract
class
RecyclerView.OnFlingListener
extends Object
java.lang.Object
|
↳ |
androidx.recyclerview.widget.RecyclerView.OnFlingListener
|
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.
Summary
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
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public constructors
OnFlingListener
public OnFlingListener ()
Public methods
onFling
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 |
int : the fling velocity on the X axis |
velocityY |
int : the fling velocity on the Y axis |
Returns |
boolean |
true if the fling was handled, false otherwise.
|