public static interface AbstractDragTabsEventHandler.Callback
Modifier and Type | Method and Description |
---|---|
void |
onCancelFling()
The method, which is invoked, when a fling has been cancelled.
|
void |
onClick(AbstractItem item)
The method, which is invoked, when a view has been clicked.
|
AbstractDragTabsEventHandler.DragState |
onDrag(AbstractDragTabsEventHandler.DragState dragState,
float dragDistance)
The method, which is invoked in order to calculate the positions of all tabs, depending
on the current drag distance.
|
void |
onFling(float distance,
long duration)
The method, which is invoked, when a fling has been triggered.
|
void |
onPressEnded(AbstractItem item)
The method, which is invoked, when pressing a view has been ended.
|
void |
onPressStarted(AbstractItem item)
The method, which is invoked, when pressing a view has been started.
|
void |
onRevertEndOvershoot()
The method, which is invoked, when an overshoot at the end should be reverted.
|
void |
onRevertStartOvershoot()
The method, which is invoked, when an overshoot at the start should be reverted.
|
void |
onSwipe(TabItem tabItem,
float distance)
The method, which is invoked, when a tab is swiped.
|
void |
onSwipeEnded(TabItem tabItem,
boolean remove,
float velocity)
The method, which is invoked, when swiping a tab ended.
|
@Nullable AbstractDragTabsEventHandler.DragState onDrag(@NonNull AbstractDragTabsEventHandler.DragState dragState, float dragDistance)
dragState
- The current drag state as a value of the enum AbstractDragTabsEventHandler.DragState
. The drag state
must either be AbstractDragTabsEventHandler.DragState.DRAG_TO_END
or AbstractDragTabsEventHandler.DragState.DRAG_TO_START
dragDistance
- The current drag distance in pixels as a Float
valueAbstractDragTabsEventHandler.DragState.OVERSHOOT_START
or AbstractDragTabsEventHandler.DragState.OVERSHOOT_END
, null otherwisevoid onPressStarted(@NonNull AbstractItem item)
item
- The item, which corresponds to the view, which has been pressed, as an instance
of the class AbstractItem
. The item may not be nullvoid onPressEnded(@NonNull AbstractItem item)
item
- Tge item, which corresponds to the view, which was previously pressed, as an
instance of the class AbstractItem
. The item may not be nullvoid onClick(@NonNull AbstractItem item)
item
- The item, which corresponds to the view, which has been clicked, as an instance
of the class AbstractItem
. The item may not be nullvoid onFling(float distance, long duration)
distance
- The distance of the fling in pixels as a Float
valueduration
- The duration of the fling in milliseconds as a Long
valuevoid onCancelFling()
void onRevertStartOvershoot()
void onRevertEndOvershoot()
void onSwipe(@NonNull TabItem tabItem, float distance)
tabItem
- The tab item, which corresponds to the swiped tab, as an instance of the class
TabItem
. The tab item may not be nulldistance
- The distance, the tab is swiped by, in pixels as a Float
valuevoid onSwipeEnded(@NonNull TabItem tabItem, boolean remove, float velocity)
tabItem
- The tab item, which corresponds to the swiped tab, as an instance of the class
TabItem
. The tab item may not be nullremove
- True, if the tab should be removed, false otherwisevelocity
- The velocity of the swipe gesture in pixels per second as a Float
value