-
- All Implemented Interfaces:
-
android.view.GestureDetector.OnGestureListener,com.batch.android.messaging.view.DelegatedTouchEventViewGroup.Delegate
public class ModalContentPanGestureDetector implements GestureDetector.OnGestureListener, DelegatedTouchEventViewGroup.Delegate
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceModalContentPanGestureDetector.OnDismissListenerDismiss listener
-
Field Summary
Fields Modifier and Type Field Description private ModalContentPanGestureDetector.OnDismissListenerdismissListener
-
Constructor Summary
Constructors Constructor Description ModalContentPanGestureDetector(Context context, boolean allowHorizontalPanning)
-
Method Summary
Modifier and Type Method Description voidsetDismissListener(ModalContentPanGestureDetector.OnDismissListener dismissListener)voidattach(DelegatedTouchEventViewGroup view, View effectsView)Attach a delegated view group to this detector. voiddismiss()booleanonInterceptTouchEvent(MotionEvent ev, DelegatedTouchEventViewGroup source)Delegated onInterceptTouchEventWorks exactly like the original method, this completly takes over it so make sureyou implement it correctly booleanonTouchEvent(MotionEvent event, DelegatedTouchEventViewGroup source, boolean wantsCancellationOnInterception)Delegated onTouchEventWorks exactly like the original method, this completly takes over it so make sureyou implement it correctlyViews can ask to receive a "fake" cancellation touch event when the delegate starts actingon touches (like responding to a pan action)This is useful if your view itself handles a touch event (like a tap) and not a subviewas this case is NOT handled by onInterceptTouchEvent booleanonDown(MotionEvent e)voidonShowPress(MotionEvent e)booleanonSingleTapUp(MotionEvent e)booleanonScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)voidonLongPress(MotionEvent e)booleanonFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY)-
Methods inherited from class android.view.GestureDetector.OnGestureListener
onDown, onFling, onLongPress, onScroll, onShowPress, onSingleTapUp -
Methods inherited from class com.batch.android.messaging.view.DelegatedTouchEventViewGroup.Delegate
onTouchEvent -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ModalContentPanGestureDetector
ModalContentPanGestureDetector(Context context, boolean allowHorizontalPanning)
-
-
Method Detail
-
setDismissListener
void setDismissListener(ModalContentPanGestureDetector.OnDismissListener dismissListener)
-
attach
void attach(DelegatedTouchEventViewGroup view, View effectsView)
Attach a delegated view group to this detector.The
- Parameters:
view- ViewGroup to make panableeffectsView- View to apply the visual effects on
-
dismiss
void dismiss()
-
onInterceptTouchEvent
boolean onInterceptTouchEvent(MotionEvent ev, DelegatedTouchEventViewGroup source)
Delegated onInterceptTouchEvent
Works exactly like the original method, this completly takes over it so make sureyou implement it correctly
-
onTouchEvent
boolean onTouchEvent(MotionEvent event, DelegatedTouchEventViewGroup source, boolean wantsCancellationOnInterception)
Delegated onTouchEvent
Works exactly like the original method, this completly takes over it so make sureyou implement it correctly
Views can ask to receive a "fake" cancellation touch event when the delegate starts actingon touches (like responding to a pan action)This is useful if your view itself handles a touch event (like a tap) and not a subviewas this case is NOT handled by onInterceptTouchEvent
-
onDown
boolean onDown(MotionEvent e)
-
onShowPress
void onShowPress(MotionEvent e)
-
onSingleTapUp
boolean onSingleTapUp(MotionEvent e)
-
onScroll
boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)
-
onLongPress
void onLongPress(MotionEvent e)
-
onFling
boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY)
-
-
-
-