public static class FastScroller.Delegate
extends java.lang.Object
FastScroller.AdapterInterface in your adapter.FastScroller.Delegate and call the delegate methods:
onAttachedToRecyclerView, onDetachedFromRecyclerView and setFastScroller.fastScrollerBubbleEnabled is true, in your adapter, implement BubbleTextCreator
and add the logic to display the label in onCreateBubbleText.setFastScroller after setting the
RecyclerView's adapter.| Constructor and Description |
|---|
Delegate() |
| Modifier and Type | Method and Description |
|---|---|
FastScroller |
getFastScroller() |
boolean |
isFastScrollerEnabled() |
void |
onAttachedToRecyclerView(RecyclerView recyclerView) |
void |
onDetachedFromRecyclerView(RecyclerView recyclerView) |
void |
setFastScroller(FastScroller fastScroller)
Sets up the
FastScroller with automatic fetch of accent color. |
void |
toggleFastScroller()
Displays or Hides the
FastScroller if previously configured. |
public void onAttachedToRecyclerView(RecyclerView recyclerView)
public void onDetachedFromRecyclerView(RecyclerView recyclerView)
public void toggleFastScroller()
FastScroller if previously configured.
setFastScroller(FastScroller)public boolean isFastScrollerEnabled()
FastScroller is configured and shown, false otherwisepublic FastScroller getFastScroller()
FastScroller objectpublic void setFastScroller(FastScroller fastScroller)
FastScroller with automatic fetch of accent color.
IMPORTANT: Call this method after the adapter is added to the RecyclerView.
NOTE: If the device has at least Lollipop, the Accent color is fetched, otherwise for previous version, the default value is used.fastScroller - instance of FastScroller