public class TabletDragTabsEventHandler extends AbstractDragTabsEventHandler<AbstractDragTabsEventHandler.Callback>
AbstractDragTabsEventHandler.Callback, AbstractDragTabsEventHandler.DragStateMAX_PRIORITY, MIN_PRIORITY| Constructor and Description |
|---|
TabletDragTabsEventHandler(TabSwitcher tabSwitcher,
Arithmetics arithmetics,
<any> viewRecycler)
Creates a new drag handler, which allows to calculate the position and state of tabs on touch
events, when using the tablet layout.
|
| Modifier and Type | Method and Description |
|---|---|
protected AbstractItem |
getFocusedItem(float position)
The method, which is invoked on implementing subclasses in order to retrieve the item, which
corresponds to the view, which is focused when clicking/dragging at a specific position.
|
android.graphics.RectF |
getTouchableArea()
Returns the bounds of the onscreen area, the handler takes into consideration for handling
touch events.
|
getArithmetics, getCallback, handleDrag, isDragging, isDraggingAllowed, isSwipeThresholdReached, onDown, onDrag, onOvershootEnd, onOvershootReverted, onOvershootStart, onReset, onTouchEvent, onUp, reset, setCallback, setDragStatecompare, equals, getDragHelper, getPriority, getTabSwitcher, getVelocityTracker, handleTouchEvent, hashCode, isInsideTouchableArea, isReset, setPointerIdpublic TabletDragTabsEventHandler(TabSwitcher tabSwitcher, Arithmetics arithmetics, <any> viewRecycler)
tabSwitcher - The tab switcher, whose tabs' positions and states should be calculated by the drag
handler, as an instance of the class TabSwitcher. The tab switcher may not be
nullarithmetics - The arithmetics, which should be used to calculate the position, size and rotation of
tabs, as an instance of the type Arithmetics. The arithmetics may not be
nullviewRecycler - The view recycler, which allows to inflate the views, which are used to visualize the
tabs, whose positions and states should be calculated by the tab switcher, as an
instance of the class AttachedViewRecycler. The view recycler may not be nullpublic final android.graphics.RectF getTouchableArea()
AbstractTouchEventHandlergetTouchableArea in class AbstractTouchEventHandlerRectF or null, if the area is not
restrictedprotected final AbstractItem getFocusedItem(float position)
AbstractDragTabsEventHandlergetFocusedItem in class AbstractDragTabsEventHandler<AbstractDragTabsEventHandler.Callback>position - The position on the dragging axis in pixels as a Float valueAbstractItem or null, if no view is focused