public class PullDownGestureEventHandler extends AbstractDragGestureEventHandler
| Modifier and Type | Class and Description |
|---|---|
static interface |
PullDownGestureEventHandler.Callback
Defines the interface, a class, which should be notified about the events of a
PullDownGestureEventHandler , must implement. |
MAX_PRIORITY, MIN_PRIORITY| Constructor and Description |
|---|
PullDownGestureEventHandler(TabSwitcher tabSwitcher,
int dragThreshold,
android.graphics.RectF touchableArea)
Creates a new event handler, which allows to handle pull down gestures, which can be used to
show the tab switcher by pulling down the currently selected tab, when using the smartphone
layout.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isDraggingAllowed()
Returns, whether performing a drag gesture is currently allowed, or not.
|
protected void |
onDown(android.view.MotionEvent event)
The method, which is invoked on implementing subclasses in order to handle, when a drag
gesture has been started.
|
protected void |
onDrag(android.view.MotionEvent event)
The method, which is invoked on implementing subclasses in order to handle, when a drag
gesture is performed.
|
protected void |
onTouchEvent()
The method, which is invoked on implementing subclasses, when a touch event is about to be
handled.
|
protected void |
onUp(android.view.MotionEvent event)
Handles, when a drag gesture has been ended.
|
void |
setCallback(PullDownGestureEventHandler.Callback callback)
Sets the callback, which should be notified about the event handler's events.
|
getTouchableAreacompare, equals, getDragHelper, getPriority, getTabSwitcher, getVelocityTracker, handleTouchEvent, hashCode, isDragging, isInsideTouchableArea, isReset, reset, setPointerIdpublic PullDownGestureEventHandler(TabSwitcher tabSwitcher, int dragThreshold, android.graphics.RectF touchableArea)
tabSwitcher - The tab switcher, the event handler belongs to, as an instance of the class TabSwitcher. The tab switcher may not be nulldragThreshold - The threshold of the drag helper, which is used to recognize drag gestures, in pixels
as an Integer value The threshold must be at least 0touchableArea - The bounds of the onscreen area, the handler should take into consideration for
handling touch events, as an instance of the class RectF or null, if the arepublic final void setCallback(PullDownGestureEventHandler.Callback callback)
callback - The callback, which should be set, as an instance of the type PullDownGestureEventHandler.Callback or
null, if no callback should be notifiedprotected final boolean isDraggingAllowed()
AbstractTouchEventHandlerisDraggingAllowed in class AbstractTouchEventHandlerprotected final void onTouchEvent()
AbstractTouchEventHandleronTouchEvent in class AbstractTouchEventHandlerprotected final void onDown(android.view.MotionEvent event)
AbstractTouchEventHandleronDown in class AbstractTouchEventHandlerevent - The touch event, which started the drag gesture, as an instance of the class MotionEvent. The touch event may not be nullprotected final void onDrag(android.view.MotionEvent event)
AbstractTouchEventHandleronDrag in class AbstractTouchEventHandlerevent - The last touch event of the drag gesture as an instance of the class MotionEvent. The touch event may not be nullprotected final void onUp(android.view.MotionEvent event)
AbstractTouchEventHandleronUp in class AbstractTouchEventHandlerevent - The touch event, which ended the drag gesture, as an instance of the class MotionEvent or null, if no fling animation should be triggered