public abstract static class CarouselView.OnScrollListener
extends java.lang.Object
Constructor and Description |
---|
OnScrollListener() |
Modifier and Type | Method and Description |
---|---|
void |
onFling(CarouselView carouselView)
Callback method to be invoked when CarouselView is animating to a final position while not under outside control.
|
void |
onScrollBegin(CarouselView carouselView)
Callback method to be invoked when CarouselView is being dragged by outside input such as user touch input.
|
void |
onScrolled(CarouselView carouselView,
int dx,
int dy)
Callback method to be invoked when the CarouselView has been scrolled.
|
void |
onScrolled(CarouselView carouselView,
int position,
int adapterPosition,
float offset)
Callback method to be invoked when the CarouselView has been scrolled.
|
void |
onScrollEnd(CarouselView carouselView)
Callback method to be invoked when CarouselView stops scrolling.
|
void |
onScrollStateChanged(CarouselView carouselView,
int newState)
Callback method to be invoked when CarouselView's scroll state changes.
|
public void onScrollBegin(CarouselView carouselView)
carouselView
- public void onScrollEnd(CarouselView carouselView)
carouselView
- public void onFling(CarouselView carouselView)
carouselView
- public void onScrollStateChanged(CarouselView carouselView, int newState)
carouselView
- The CarouselView whose scroll state has changed.newState
- The updated scroll state. One of RecyclerView.SCROLL_STATE_IDLE
,
RecyclerView.SCROLL_STATE_DRAGGING
or RecyclerView.SCROLL_STATE_SETTLING
.public void onScrolled(CarouselView carouselView, int dx, int dy)
carouselView
- The CarouselView which has been scrolled.dx
- The amount of horizontal scroll.dy
- The amount of vertical scroll.public void onScrolled(CarouselView carouselView, int position, int adapterPosition, float offset)
carouselView
- The CarouselView which has been scrolled.position
- Current position
.adapterPosition
- Current adapter position
.offset
- The decimal part of the current position, in the range of [0, 1).