scrollHorizontallyBy

Scroll horizontally by dx pixels in screen coordinates and return the distance traveled. The default implementation does nothing and returns 0.

Return

The actual distance scrolled. The return value will be negative if dx was negative and scrolling proceeeded in that direction. Math.abs(result) may be less than dx if a boundary was reached.

Parameters

dx

distance to scroll by in pixels. X increases as scroll position approaches the right.

recycler

Recycler to use for fetching potentially cached views for a position

state

Transient state of RecyclerView