Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

OnFlingListener

abstract class OnFlingListener
kotlin.Any
   ↳ androidx.recyclerview.widget.RecyclerView.OnFlingListener

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

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

Summary

Public constructors

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

Public methods
abstract Boolean
onFling(velocityX: Int, velocityY: Int)

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

Public constructors

<init>

OnFlingListener()

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

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

Public methods

onFling

abstract fun onFling(
    velocityX: Int,
    velocityY: Int
): Boolean

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 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
Return
Boolean true if the fling was handled, false otherwise.