public abstract class AbstractTabSwitcherLayout extends java.lang.Object implements TabSwitcherLayout, android.view.ViewTreeObserver.OnGlobalLayoutListener, Model.Listener, TouchEventDispatcher.Callback, AbstractDragTabsEventHandler.Callback, SwipeGestureEventHandler.Callback, PullDownGestureEventHandler.Callback
TabSwitcher.| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractTabSwitcherLayout.AnimationListenerWrapper
A animation listener, which increases the number of running animations, when the observed
animation is started, and decreases the number of accordingly, when the animation is
finished.
|
static interface |
AbstractTabSwitcherLayout.Callback
Defines the interface, a class, which should be notified about the events of a tab switcher
layout, must implement.
|
protected class |
AbstractTabSwitcherLayout.InitialItemIterator
An iterator, which allows to iterate the items, which correspond to the child views of a
TabSwitcher. |
protected class |
AbstractTabSwitcherLayout.InitialItemIteratorBuilder
A builder, which allows to configure and create instances of the class
AbstractTabSwitcherLayout.InitialItemIterator. |
static class |
AbstractTabSwitcherLayout.LayoutListenerWrapper
A layout listener, which unregisters itself from the observed view, when invoked.
|
| Constructor and Description |
|---|
AbstractTabSwitcherLayout(TabSwitcher tabSwitcher,
TabSwitcherModel model,
Arithmetics arithmetics,
TabSwitcherStyle style,
TouchEventDispatcher touchEventDispatcher)
Creates a new layout, which implements the functionality of a
TabSwitcher. |
| Modifier and Type | Method and Description |
|---|---|
protected float |
calculateAttachedPosition(int count)
Calculates and returns the position on the dragging axis, where the distance between an item
and its predecessor should have reached the maximum.
|
protected float |
calculateMaxEndPosition(int index)
The method, which is invoked on implementing subclasses in order to retrieve the maximum
position of a specific item, when dragging towards the end.
|
protected float |
calculateMinStartPosition(int index)
The method, which is invoked on implementing subclasses in order to retrieve the minimum
position of a specific item, when dragging towards the start.
|
protected abstract <any> |
calculatePositionAndStateWhenStackedAtEnd(int index)
The method, which is invoked on implementing subclasses in order to retrieve the position and
state of a specific item, when stacked at the end.
|
protected <any> |
calculatePositionAndStateWhenStackedAtStart(int count,
int index,
AbstractItem predecessor)
Calculates and returns the position and state of a specific item, when stacked at the start.
|
protected abstract <any> |
calculatePositionAndStateWhenStackedAtStart(int count,
int index,
State predecessorState)
The method, which is invoked on implementing subclasses in order to retrieve the position and
state of a specific item, when stacked at the start.
|
protected abstract float |
calculatePredecessorPosition(AbstractItem item,
AbstractItem successor)
Calculates the position of an item in relation to the position of its successor.
|
protected abstract float |
calculateSuccessorPosition(AbstractItem item,
AbstractItem predecessor)
Calculates the position of an item in relation to the position of its predecessor.
|
protected <any> |
clipPosition(int index,
float position,
AbstractItem predecessor)
Clips the position of a specific item.
|
protected <any> |
clipPosition(int index,
float position,
State predecessorState)
Clips the position of a specific item.
|
<any> |
detachLayout(boolean tabsOnly)
Detaches the layout.
|
protected Arithmetics |
getArithmetics()
Returns the arithmetics, which are used by the layout.
|
protected abstract <any> |
getContentViewRecycler()
The method, which is invoked on implementing subclasses in order to retrieve the view
recycler, which allows to recycle the views, which are associated with tabs.
|
protected android.content.Context |
getContext()
Returns the context, which is used by the layout.
|
abstract AbstractDragTabsEventHandler<?> |
getDragHandler()
The method, which is invoked on implementing subclasses in order to retrieve the drag
handler, which is used by the layout.
|
protected int |
getFirstVisibleIndex()
Returns the index of the first visible tab.
|
protected int |
getItemCount()
Returns the number of child views, which are contained by the tab switcher.
|
protected Logger |
getLogger()
Returns the logger, which is used for logging.
|
protected TabSwitcherModel |
getModel()
Returns the model of the tab switcher, the layout belongs to.
|
protected abstract int |
getStackedTabCount()
The method, which is invoked on implementing subclasses in order to retrieve the number of
tabs, which are contained by a stack.
|
protected int |
getStackedTabSpacing()
Returns the space between tabs, which are part of a stack.
|
protected TabSwitcherStyle |
getStyle()
Returns the style, which allows to retrieve style attributes of the tab switcher.
|
protected abstract AbstractTabRecyclerAdapter |
getTabRecyclerAdapter()
The method, which is invoked on implementing subclasses in order to retrieve the adapter of
the view recycler, which allows to inflate the views, which are used to visualize the tabs.
|
protected TabSwitcher |
getTabSwitcher()
Returns the tab switcher, the layout belongs to.
|
protected abstract <any> |
getTabViewRecycler()
The method, which is invoked on implementing subclasses in order to retrieve the view
recycler, which allows to inflate the views, which are used to visualize the tabs.
|
android.view.Menu |
getToolbarMenu()
Returns the menu of the toolbar, which is shown, when the tab switcher is shown.
|
protected abstract void |
inflateAndUpdateView(AbstractItem item,
boolean dragging,
android.view.ViewTreeObserver.OnGlobalLayoutListener listener)
The method, which is invoked on implementing subclasses in order to inflate and update the
view, which is used to visualize a specific item.
|
void |
inflateLayout(boolean tabsOnly)
Inflates the layout.
|
protected void |
inflateOrRemoveView(AbstractItem item,
boolean dragging)
Inflates or removes the view, which is used to visualize a specific item, depending on the
item's current state.
|
protected void |
inflateView(AbstractItem item,
android.view.ViewTreeObserver.OnGlobalLayoutListener listener,
java.lang.Integer... params)
Inflates the view, which is used to visualize a specific item.
|
boolean |
isAnimationRunning()
Returns, whether an animation is currently running, or not.
|
protected boolean |
isOvershootingAtEnd(AbstractDragTabsEventHandler.DragState dragState,
AbstractItemIterator iterator)
The method, which is invoked on implementing subclasses in order to retrieve, whether the
items are overshooting at the end.
|
protected boolean |
isOvershootingAtStart()
The method, which is invoked on implementing subclasses in order to retrieve, whether the
items are overshooting at the start.
|
protected boolean |
isStackedAtStart(int index)
Returns, whether a hidden tab at a specific index, is part of the stack, which is located at
the start, or not.
|
void |
onAddedEventHandler(TouchEventDispatcher dispatcher,
AbstractTouchEventHandler eventHandler)
The method, which is invoked, when an event handler has been added.
|
void |
onAddTabButtonColorChanged(android.content.res.ColorStateList colorStateList)
The method, which is invoked, when the color of the button, which allows to add a new
tab, has been changed.
|
void |
onAddTabButtonVisibilityChanged(boolean visible)
The method, which is invoked, when it has been changed, whether the button, which allows
to add a new tab, should be shown, or not.
|
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.
|
protected <any> |
onCreateContentRecyclerAdapter()
The method, which is invoked on implementing subclasses in order to create the view recycler
adapter, which allows to inflate the views, which are associated with tabs.
|
void |
onDecoratorChanged(TabSwitcherDecorator decorator)
The method, which is invoked, when the decorator has been changed.
|
protected abstract <any> |
onDetachLayout(boolean tabsOnly)
The method, which is invoked on implementing subclasses in order to detach the layout.
|
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.
|
protected abstract void |
onInflateLayout(android.view.LayoutInflater inflater,
boolean tabsOnly)
The method, which is invoked on implementing subclasses in order to inflate the layout.
|
void |
onLogLevelChanged(LogLevel logLevel)
The method, which is invoked, when the log level has been changed.
|
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 |
onPulledDown()
The method, which is notified, when the currently selected tab has been pulled down.
|
void |
onRemovedEventHandler(TouchEventDispatcher dispatcher,
AbstractTouchEventHandler eventHandler)
The method, which is invoked, when an event handler has been removed.
|
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.
|
void |
onSwitcherHidden()
The method, which is invoked, when the tab switcher has been hidden.
|
void |
onSwitcherShown()
The method, which is invoked, when the tab switcher has been shown.
|
void |
onTabBackgroundColorChanged(android.content.res.ColorStateList colorStateList)
The method, which is invoked, when the background color of a tab has been changed.
|
void |
onTabCloseButtonIconChanged(android.graphics.drawable.Drawable icon)
The method, which is invoked, when the icon of a tab's close button has been changed.
|
void |
onTabContentBackgroundColorChanged(int color)
The method, which is invoked, when the background color of a tab's content has been
changed.
|
void |
onTabIconChanged(android.graphics.drawable.Drawable icon)
The method, which is invoked, when the default icon of a tab has been changed.
|
void |
onTabProgressBarColorChanged(int color)
The method, which is invoked, when the color of a tab's progress bar has been changed.
|
void |
onTabTitleColorChanged(android.content.res.ColorStateList colorStateList)
The method, which is invoked, when the text color of a tab's title has been changed.
|
void |
onToolbarMenuInflated(int resourceId,
OnMenuItemClickListener listener)
The method, which is invoked, when the menu of the toolbar, which is shown, when the tab
switcher is shown, has been inflated.
|
void |
onToolbarNavigationIconChanged(android.graphics.drawable.Drawable icon,
android.view.View.OnClickListener listener)
The method, which is invoked, when the navigation icon of the toolbar, which is shown,
when the tab switcher is shown, has been changed.
|
void |
onToolbarTitleChanged(java.lang.CharSequence title)
The method, which is invoked, when the title of the toolbar, which is shown, when the tab
switcher is shown, has been changed.
|
void |
onToolbarVisibilityChanged(boolean visible)
The method, which is invoked, when it has been changed, whether the toolbars should be
shown, when the tab switcher is shown, or not.
|
protected void |
secondLayoutPass(AbstractItemIterator.AbstractBuilder builder)
The method, which is called when dragging after the positions and states of all tabs have
been calculated.
|
void |
setCallback(AbstractTabSwitcherLayout.Callback callback)
Sets the callback, which should be notified about the layout's events.
|
protected void |
setFirstVisibleIndex(int firstVisibleIndex)
Sets the index of the first visible tab.
|
protected void |
updateView(AbstractItem item,
boolean dragging)
Updates the view, which is used to visualize a specific item.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTabContainer, getToolbarsonGlobalLayoutonAllTabsAdded, onAllTabsRemoved, onEmptyViewChanged, onPaddingChanged, onSelectionChanged, onTabAdded, onTabRemovedonSwitchingBetweenTabs, onSwitchingBetweenTabsEndedpublic AbstractTabSwitcherLayout(TabSwitcher tabSwitcher, TabSwitcherModel model, Arithmetics arithmetics, TabSwitcherStyle style, TouchEventDispatcher touchEventDispatcher)
TabSwitcher.tabSwitcher - The tab switcher, the layout belongs to, as an instance of the class TabSwitcher. The tab switcher may not be nullmodel - The model of the tab switcher, the layout belongs to, as an instance of the class
TabSwitcherModel. The model may not be nullarithmetics - The arithmetics, which should be used by the layout, as an instance of the type
Arithmetics. The arithmetics may not be nullstyle - The style, which allows to retrieve style attributes of the tab switcher, as an
instance of the class TabSwitcherStyle. The style may not be nulltouchEventDispatcher - The dispatcher, which is used to dispatch touch events to event handlers, as an
instance of the class TouchEventDispatcher. The dispatcher may not be nullprotected final TabSwitcher getTabSwitcher()
TabSwitcher. The tab switcher may not be nullprotected final TabSwitcherModel getModel()
TabSwitcherModel. The model may not be nullprotected final Arithmetics getArithmetics()
Arithmetics. The arithmetics may not be nullprotected final TabSwitcherStyle getStyle()
TabSwitcherStyle. The style may not be nullprotected final int getStackedTabSpacing()
Integer
valueprotected final Logger getLogger()
protected final android.content.Context getContext()
Context. The context may not be nullprotected final int getFirstVisibleIndex()
Integer value or -1, if no tabs is
visibleprotected final void setFirstVisibleIndex(int firstVisibleIndex)
firstVisibleIndex - The index, which should be set, as an Integer value or -1, if no tab is
visibleprotected final int getItemCount()
Integer valueprotected final boolean isStackedAtStart(int index)
index - The index of the hidden tab, as an Integer valueprotected final <any> clipPosition(int index,
float position,
AbstractItem predecessor)
index - The index of the item, whose position should be clipped, as an Integer valueposition - The position, which should be clipped, in pixels as a Float valuepredecessor - The predecessor of the given item as an instance of the class AbstractItem or
null, if the item does not have a predecessorprotected final <any> clipPosition(int index,
float position,
State predecessorState)
index - The index of the item, whose position should be clipped, as an Integer valueposition - The position, which should be clipped, in pixels as a Float valuepredecessorState - The state of the predecessor of the given item as a value of the enum State
or null, if the item does not have a predecessorprotected final <any> calculatePositionAndStateWhenStackedAtStart(int count,
int index,
AbstractItem predecessor)
count - The total number of items, which are currently contained by the tab switcher, as an
Integer valueindex - The index of the item, whose position and state should be returned, as an Integer valuepredecessor - The predecessor of the given item as an instance of the class AbstractItem or
null, if the item does not have a predecessorprotected final void inflateOrRemoveView(AbstractItem item, boolean dragging)
item - The item, whose view should be inflated or removed, as an instance of the class
AbstractItem. The item may not be nulldragging - True, if the item is currently being dragged, false otherwiseprotected final void inflateView(AbstractItem item, android.view.ViewTreeObserver.OnGlobalLayoutListener listener, java.lang.Integer... params)
item - The item, whose view should be inflated, as an instance of the class AbstractItem. The item may not be nulllistener - The layout listener, which should be notified, when the view has been inflated, as an
instance of the type ViewTreeObserver.OnGlobalLayoutListener or null, if no listener should be
notifiedparams - An array, which contains optional parameters, which should be passed to the view
recycler, which is used to inflate the view, as an Integer array or null, if
no optional parameters should be usedprotected void updateView(AbstractItem item, boolean dragging)
item - The item, whose view should be updated, as an instance of the class AbstractItem. The item may not be nulldragging - True, if the item is currently being dragged, false otherwiseprotected float calculateAttachedPosition(int count)
count - The total number of items, which are contained by the tab switcher, as an Integer valueFloat value or -1,
if no attached position is usedpublic abstract AbstractDragTabsEventHandler<?> getDragHandler()
AbstractDragTabsEventHandler or null, if the drag handler has not been initialized yetprotected abstract void onInflateLayout(android.view.LayoutInflater inflater,
boolean tabsOnly)
inflater - The layout inflater, which should be used, as an instance of the class LayoutInflater. The layout inflater may not be nulltabsOnly - True, if only the tabs should be inflated, false otherwiseprotected abstract <any> onDetachLayout(boolean tabsOnly)
tabsOnly - True, if only the tabs should be detached, false otherwiseprotected abstract <any> getContentViewRecycler()
protected abstract <any> getTabViewRecycler()
protected abstract AbstractTabRecyclerAdapter getTabRecyclerAdapter()
AbstractTabRecyclerAdapter or
null, if the view recycler has not been initialized yetprotected abstract void inflateAndUpdateView(AbstractItem item, boolean dragging, android.view.ViewTreeObserver.OnGlobalLayoutListener listener)
item - The item, whose view should be inflated, as an instance of the class AbstractItem. The item may not be nulldragging - True, if the view is currently being dragged, false otherwiselistener - The layout listener, which should be notified, when the view has been inflated, as an
instance of the type ViewTreeObserver.OnGlobalLayoutListener or null, if no listener should be
notifiedprotected abstract int getStackedTabCount()
Integer valueprotected abstract <any> calculatePositionAndStateWhenStackedAtStart(int count,
int index,
State predecessorState)
count - The total number of items, which are currently contained by the tab switcher, as an
Integer valueindex - The index of the item, whose position and state should be returned, as an Integer valuepredecessorState - The state of the predecessor of the given item as a value of the enum State
or null, if the item does not have a predecessorprotected abstract <any> calculatePositionAndStateWhenStackedAtEnd(int index)
index - The index of the item, whose position and state should be returned, as an Integer valueprotected abstract float calculateSuccessorPosition(AbstractItem item, AbstractItem predecessor)
item - The item, whose position should be calculated, as an instance of the class AbstractItem. The item may not be nullpredecessor - The predecessor as an instance of the class AbstractItem. The predecessor may
not be nullFloat valueprotected abstract float calculatePredecessorPosition(AbstractItem item, AbstractItem successor)
item - The item, whose position should be calculated, as an instance of the class AbstractItem. The item may not be nullsuccessor - The successor as an instance of the class AbstractItem. The successor may not
be nullFloat valueprotected float calculateMinStartPosition(int index)
index - The index of the item, whose position should be calculated, as an Integer
valueFloat value or -1, if no
minimum position is availableprotected float calculateMaxEndPosition(int index)
index - The index of the item, whose position should be calculated, as an Integer
valueFloat value or -1, if no
maximum position is availableprotected boolean isOvershootingAtStart()
protected boolean isOvershootingAtEnd(AbstractDragTabsEventHandler.DragState dragState, AbstractItemIterator iterator)
dragState - The current drag state as an instance of the enum AbstractDragTabsEventHandler.DragState. The drag state
may not be nulliterator - An iterator, which allows to iterate the items, which are contained by the tab
switcher, as an instance of the class AbstractItemIterator. The iterator may
not be nullprotected void secondLayoutPass(AbstractItemIterator.AbstractBuilder builder)
builder - The builder, which allows to create the iterator, which should be used to iterate the
tabs, as an instance of the class AbstractItemIterator.AbstractBuilder. The
builder may not be nullprotected <any> onCreateContentRecyclerAdapter()
public final void inflateLayout(boolean tabsOnly)
tabsOnly - True, if only the tabs should be inflated, false otherwisepublic final <any> detachLayout(boolean tabsOnly)
tabsOnly - True, if only the tabs should be detached, false otherwisepublic final void setCallback(AbstractTabSwitcherLayout.Callback callback)
callback - The callback, which should be set, as an instance of the type AbstractTabSwitcherLayout.Callback or
null, if no callback should be notifiedpublic final boolean isAnimationRunning()
TabSwitcherLayoutisAnimationRunning in interface TabSwitcherLayoutpublic final android.view.Menu getToolbarMenu()
TabSwitcherLayoutgetToolbarMenu in interface TabSwitcherLayoutMenu or null, if the view
has not been laid out yetpublic final void onLogLevelChanged(LogLevel logLevel)
Model.ListeneronLogLevelChanged in interface Model.ListenerlogLevel - The log level, which has been set, as a value of the enum LogLevel. The log level
may not be nullpublic void onDecoratorChanged(TabSwitcherDecorator decorator)
Model.ListeneronDecoratorChanged in interface Model.Listenerdecorator - The decorator, which has been set, as an instance of the class TabSwitcherDecorator. The decorator may not be nullpublic void onAddTabButtonVisibilityChanged(boolean visible)
Model.ListeneronAddTabButtonVisibilityChanged in interface Model.Listenervisible - True, if the button, which allows to add a new tab, should be shown, false
otherwisepublic final void onAddTabButtonColorChanged(android.content.res.ColorStateList colorStateList)
Model.ListeneronAddTabButtonColorChanged in interface Model.ListenercolorStateList - The color, which has been set, as an instance of the class ColorStateList
or null, if the default color should be usedpublic final void onToolbarVisibilityChanged(boolean visible)
Model.ListeneronToolbarVisibilityChanged in interface Model.Listenervisible - True, if the toolbars should be shown, when the tab switcher is shown, false
otherwisepublic final void onToolbarTitleChanged(java.lang.CharSequence title)
Model.ListeneronToolbarTitleChanged in interface Model.Listenertitle - The title, which has been set, as an instance of the type CharSequence or
null, if no title is setpublic final void onToolbarNavigationIconChanged(android.graphics.drawable.Drawable icon,
android.view.View.OnClickListener listener)
Model.ListeneronToolbarNavigationIconChanged in interface Model.Listenericon - The navigation icon, which has been set, as an instance of the class Drawable or null, if no navigation icon is setlistener - The listener, which should be notified, when the navigation item has been
clicked, as an instance of the type View.OnClickListener or null, if no
listener should be notifiedpublic final void onToolbarMenuInflated(int resourceId,
OnMenuItemClickListener listener)
Model.ListeneronToolbarMenuInflated in interface Model.ListenerresourceId - The resource id of the menu, which has been inflated, as an Integer
value. The resource id must correspond to a valid menu resourcelistener - The listener, which has been registered to be notified, when an item of the menu
has been clicked, as an instance of the type OnMenuItemClickListener or null, if
no listener should be notifiedpublic final void onTabIconChanged(android.graphics.drawable.Drawable icon)
Model.ListeneronTabIconChanged in interface Model.Listenericon - The icon, which has been set, as an instance of the class Drawable or
null, if no icon is setpublic void onTabBackgroundColorChanged(android.content.res.ColorStateList colorStateList)
Model.ListeneronTabBackgroundColorChanged in interface Model.ListenercolorStateList - The color state list, which has been set, as an instance of the class ColorStateList or null, if the default color should be usedpublic void onTabContentBackgroundColorChanged(int color)
Model.ListeneronTabContentBackgroundColorChanged in interface Model.Listenercolor - The color, which has been set, as an Integer value or -1, if the default
color should be usedpublic final void onTabTitleColorChanged(android.content.res.ColorStateList colorStateList)
Model.ListeneronTabTitleColorChanged in interface Model.ListenercolorStateList - The color state list, which has been set, as an instance of the class ColorStateList or null, if the default color should be usedpublic final void onTabCloseButtonIconChanged(android.graphics.drawable.Drawable icon)
Model.ListeneronTabCloseButtonIconChanged in interface Model.Listenericon - The icon, which has been set, as an instance of the class Drawable or
null, if the default icon should be usedpublic final void onTabProgressBarColorChanged(int color)
Model.ListeneronTabProgressBarColorChanged in interface Model.Listenercolor - The color, which has been set, as an Integer value or -1, if the default
color should be usedpublic void onSwitcherShown()
Model.ListeneronSwitcherShown in interface Model.Listenerpublic void onSwitcherHidden()
Model.ListeneronSwitcherHidden in interface Model.Listenerpublic final void onAddedEventHandler(TouchEventDispatcher dispatcher, AbstractTouchEventHandler eventHandler)
TouchEventDispatcher.CallbackonAddedEventHandler in interface TouchEventDispatcher.Callbackdispatcher - The dispatcher, the event handler has been added to, as an instance of the class
TouchEventDispatcher. The dispatcher may not be nulleventHandler - The event handler, which has been added, as an instance of the class AbstractTouchEventHandler. The event handler may not be nullpublic final void onRemovedEventHandler(TouchEventDispatcher dispatcher, AbstractTouchEventHandler eventHandler)
TouchEventDispatcher.CallbackonRemovedEventHandler in interface TouchEventDispatcher.Callbackdispatcher - The dispatcher, the event handler has been removed from, as an instance of the
class TouchEventDispatcher. The dispatcher may not be nulleventHandler - The event handler, which has been removed, as an instance of the class AbstractTouchEventHandler. The event handler may not be nullpublic final AbstractDragTabsEventHandler.DragState onDrag(AbstractDragTabsEventHandler.DragState dragState, float dragDistance)
AbstractDragTabsEventHandler.CallbackonDrag in interface AbstractDragTabsEventHandler.CallbackdragState - 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_STARTdragDistance - The current drag distance in pixels as a Float valueAbstractDragTabsEventHandler.DragState.OVERSHOOT_START or AbstractDragTabsEventHandler.DragState.OVERSHOOT_END, null otherwisepublic final void onPressStarted(AbstractItem item)
AbstractDragTabsEventHandler.CallbackonPressStarted in interface AbstractDragTabsEventHandler.Callbackitem - The item, which corresponds to the view, which has been pressed, as an instance
of the class AbstractItem. The item may not be nullpublic final void onPressEnded(AbstractItem item)
AbstractDragTabsEventHandler.CallbackonPressEnded in interface AbstractDragTabsEventHandler.Callbackitem - Tge item, which corresponds to the view, which was previously pressed, as an
instance of the class AbstractItem. The item may not be nullpublic final void onClick(AbstractItem item)
AbstractDragTabsEventHandler.CallbackonClick in interface AbstractDragTabsEventHandler.Callbackitem - The item, which corresponds to the view, which has been clicked, as an instance
of the class AbstractItem. The item may not be nullpublic final void onFling(float distance,
long duration)
AbstractDragTabsEventHandler.CallbackonFling in interface AbstractDragTabsEventHandler.Callbackdistance - The distance of the fling in pixels as a Float valueduration - The duration of the fling in milliseconds as a Long valuepublic final void onCancelFling()
AbstractDragTabsEventHandler.CallbackonCancelFling in interface AbstractDragTabsEventHandler.Callbackpublic void onRevertStartOvershoot()
AbstractDragTabsEventHandler.CallbackonRevertStartOvershoot in interface AbstractDragTabsEventHandler.Callbackpublic void onRevertEndOvershoot()
AbstractDragTabsEventHandler.CallbackonRevertEndOvershoot in interface AbstractDragTabsEventHandler.Callbackpublic void onSwipe(TabItem tabItem, float distance)
AbstractDragTabsEventHandler.CallbackonSwipe in interface AbstractDragTabsEventHandler.CallbacktabItem - 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 valuepublic void onSwipeEnded(TabItem tabItem, boolean remove, float velocity)
AbstractDragTabsEventHandler.CallbackonSwipeEnded in interface AbstractDragTabsEventHandler.CallbacktabItem - 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 valuepublic void onPulledDown()
PullDownGestureEventHandler.CallbackonPulledDown in interface PullDownGestureEventHandler.Callback