PagerSnapScrollListener

PagerSnapScrollListener

class PagerSnapScrollListener

Fields

Name Description
var pageStates: MutableList<VisiblePageState>
var pageStatesPool: List(maxPages) { VisiblePageState(0, recyclerView, 0, 0, 0f) }

Constructors

<init>

constructor(recyclerView: RecyclerView, externalListener: RVPagerStateListener, maxPages: Int)

Parameters

Name Description
recyclerView: RecyclerView
externalListener: RVPagerStateListener
maxPages: Int

Methods

onScrolled

fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int)

Parameters

Name Description
recyclerView: RecyclerView
dx: Int
dy: Int

ReturnValue

Name Description
Unit

onScrollStateChanged

fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int)

Parameters

Name Description
recyclerView: RecyclerView
newState: Int

ReturnValue

Name Description
Unit

CompanionObject

PagerSnapScrollListener

class PagerSnapScrollListener

Fields

Name Description
val statesArray: listOf(RVPageScrollState.Idle, RVPageScrollState.Dragging, RVPageScrollState.Settling)