public interface RecyclerViewScroller
RecyclerView| Modifier and Type | Method and Description |
|---|---|
android.support.v7.widget.RecyclerView.OnScrollListener |
getOnScrollListener()
Since
RecyclerView.OnScrollListener is not implemented as an interface, RecyclerViewScrollers cannot implement this
interface, and in most cases, it makes no sense for them to extend a scroll listener. |
void |
scrollTo(float scrollProgress,
boolean fromTouch)
Indicate to the scroller that it should scroll to a certain amount of scroll progress
|
void |
setRecyclerView(android.support.v7.widget.RecyclerView recyclerView)
What good is a RecyclerViewScroller without a
RecyclerView?! |
void setRecyclerView(android.support.v7.widget.RecyclerView recyclerView)
RecyclerView?!recyclerView - to scroll using the scrollerandroid.support.v7.widget.RecyclerView.OnScrollListener getOnScrollListener()
RecyclerView.OnScrollListener is not implemented as an interface, RecyclerViewScrollers cannot implement this
interface, and in most cases, it makes no sense for them to extend a scroll listener. For this reason, we must
provide a listener that is intended to be fetched and set as a listener on a RecyclerView.
This assumes that a scroller should to know when RecyclerViews are scrolled independently of scroller actions.void scrollTo(float scrollProgress,
boolean fromTouch)
scrollProgress - the progress of the scroll expressed as a fraction from [0, 1]fromTouch - true if this scroll request was triggered by a touch