public class RecyclerCollectionEventsController extends RecyclerEventsController
Prop
to a
RecyclerCollection component to trigger events from outside the component hierarchy.RecyclerEventsController.OnRecyclerUpdateListener
Constructor and Description |
---|
RecyclerCollectionEventsController() |
Modifier and Type | Method and Description |
---|---|
void |
manuallySetViewportChangedFromExternalScroll(int firstVisibleIndex,
int lastVisibleIndex,
int firstFullyVisibleIndex,
int lastFullyVisibleIndex)
Deprecated.
|
void |
requestRefresh()
Sent the RecyclerCollection a request to refresh it's backing data.
|
void |
requestRefresh(boolean showSpinner)
Sent the RecyclerCollection a request to refresh it's backing data.
|
void |
requestScrollBy(int dx,
int dy)
Send the
RecyclerCollectionComponent a request to scroll the content by the given
margins. |
void |
requestScrollToNextPosition(boolean animated)
Send the
RecyclerCollectionComponent a request to scroll the content to the next item
in the binder. |
void |
requestScrollToPositionWithSnap(int target)
Send the
RecyclerCollectionComponent a request to scroll the content to the given
target position taking into account snapping behavior. |
void |
requestScrollToPositionWithSnap(int target,
boolean animated)
Send the
RecyclerCollectionComponent a request to scroll the content to the given
target position taking into account snapping behavior. |
void |
requestScrollToPositionWithSnap(int target,
RecyclerView.SmoothScroller smoothScroller)
Send the
RecyclerCollectionComponent a request to scroll the content to the given
target position taking into account provided snapping behavior. |
void |
requestScrollToPreviousPosition(boolean animated)
Send the
RecyclerCollectionComponent a request to scroll the content to the previous
item in the binder. |
void |
requestSmoothScrollBy(int dx,
int dy)
Send the
RecyclerCollectionComponent a request to scroll the content by the given
margins, animate a scroll by the given amount of pixels along either axis. |
void |
setSectionTree(SectionTree sectionTree) |
void |
setSnapMode(int snapMode) |
void |
updateFirstLastFullyVisibleItemPositions(LayoutInfo layoutInfo) |
clearRefreshing, getRecyclerView, requestScrollToPosition, requestScrollToPositionWithOffset, requestScrollToTop, setOnRecyclerUpdateListener, setSectionsRecyclerView, showRefreshing
public void requestRefresh()
public void requestRefresh(boolean showSpinner)
showSpinner
- public void requestScrollToNextPosition(boolean animated)
RecyclerCollectionComponent
a request to scroll the content to the next item
in the binder.animated
- whether the scroll will happen with animation.public void requestScrollToPreviousPosition(boolean animated)
RecyclerCollectionComponent
a request to scroll the content to the previous
item in the binder.animated
- whether the scroll will happen with animation.public void requestScrollToPositionWithSnap(int target)
RecyclerCollectionComponent
a request to scroll the content to the given
target position taking into account snapping behavior.
For example, if the content is center snapped, then the RecyclerView
will scroll
contents until the target position is visible at the center (as opposed to the edge of RecyclerView
which is the case when using RecyclerEventsController.requestScrollToPosition(int, boolean)
).
public void requestScrollToPositionWithSnap(int target, boolean animated)
RecyclerCollectionComponent
a request to scroll the content to the given
target position taking into account snapping behavior. Can toggle if the scroll is animatedpublic void requestScrollToPositionWithSnap(int target, RecyclerView.SmoothScroller smoothScroller)
RecyclerCollectionComponent
a request to scroll the content to the given
target position taking into account provided snapping behavior. The provided smoothScroller is
used to scroll to the target.public void requestScrollBy(int dx, int dy)
RecyclerCollectionComponent
a request to scroll the content by the given
margins.public void requestSmoothScrollBy(int dx, int dy)
RecyclerCollectionComponent
a request to scroll the content by the given
margins, animate a scroll by the given amount of pixels along either axis.public void setSectionTree(SectionTree sectionTree)
public void setSnapMode(int snapMode)
public void updateFirstLastFullyVisibleItemPositions(LayoutInfo layoutInfo)
@Deprecated public void manuallySetViewportChangedFromExternalScroll(int firstVisibleIndex, int lastVisibleIndex, int firstFullyVisibleIndex, int lastFullyVisibleIndex)
You almost definitely don't want to use this. Please talk to the Litho team if you think you need to!