Package com.batch.android.messaging
Class ModalContentPanGestureDetector
- java.lang.Object
-
- com.batch.android.messaging.ModalContentPanGestureDetector
-
- All Implemented Interfaces:
android.view.GestureDetector.OnGestureListener,DelegatedTouchEventViewGroup.Delegate
public class ModalContentPanGestureDetector extends java.lang.Object implements android.view.GestureDetector.OnGestureListener, DelegatedTouchEventViewGroup.Delegate
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceModalContentPanGestureDetector.OnDismissListenerDismiss listener
-
Constructor Summary
Constructors Constructor Description ModalContentPanGestureDetector(android.content.Context context, boolean allowHorizontalPanning)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidattach(DelegatedTouchEventViewGroup view, android.view.View effectsView)Attach a delegated view group to this detector.voiddismiss()booleanonDown(android.view.MotionEvent e)booleanonFling(android.view.MotionEvent e1, android.view.MotionEvent e2, float velocityX, float velocityY)booleanonInterceptTouchEvent(android.view.MotionEvent ev, DelegatedTouchEventViewGroup source)DelegatedViewGroup.onInterceptTouchEvent(MotionEvent)voidonLongPress(android.view.MotionEvent e)booleanonScroll(android.view.MotionEvent e1, android.view.MotionEvent e2, float distanceX, float distanceY)voidonShowPress(android.view.MotionEvent e)booleanonSingleTapUp(android.view.MotionEvent e)booleanonTouchEvent(android.view.MotionEvent event, DelegatedTouchEventViewGroup source, boolean wantsCancellationOnInterception)DelegatedView.onTouchEvent(MotionEvent)voidsetDismissListener(ModalContentPanGestureDetector.OnDismissListener dismissListener)
-
-
-
Method Detail
-
attach
public void attach(DelegatedTouchEventViewGroup view, android.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
-
setDismissListener
public void setDismissListener(ModalContentPanGestureDetector.OnDismissListener dismissListener)
-
dismiss
public void dismiss()
-
onInterceptTouchEvent
public boolean onInterceptTouchEvent(android.view.MotionEvent ev, DelegatedTouchEventViewGroup source)Description copied from interface:DelegatedTouchEventViewGroup.DelegateDelegatedViewGroup.onInterceptTouchEvent(MotionEvent)Works exactly like the original method, this completly takes over it so make sure you implement it correctly
- Specified by:
onInterceptTouchEventin interfaceDelegatedTouchEventViewGroup.Delegate
-
onTouchEvent
public boolean onTouchEvent(android.view.MotionEvent event, DelegatedTouchEventViewGroup source, boolean wantsCancellationOnInterception)Description copied from interface:DelegatedTouchEventViewGroup.DelegateDelegatedView.onTouchEvent(MotionEvent)Works exactly like the original method, this completly takes over it so make sure you implement it correctly
Views can ask to receive a "fake" cancellation touch event when the delegate starts acting on touches (like responding to a pan action) This is useful if your view itself handles a touch event (like a tap) and not a subview as this case is NOT handled by onInterceptTouchEvent
- Specified by:
onTouchEventin interfaceDelegatedTouchEventViewGroup.Delegate
-
onDown
public boolean onDown(android.view.MotionEvent e)
- Specified by:
onDownin interfaceandroid.view.GestureDetector.OnGestureListener
-
onShowPress
public void onShowPress(android.view.MotionEvent e)
- Specified by:
onShowPressin interfaceandroid.view.GestureDetector.OnGestureListener
-
onSingleTapUp
public boolean onSingleTapUp(android.view.MotionEvent e)
- Specified by:
onSingleTapUpin interfaceandroid.view.GestureDetector.OnGestureListener
-
onScroll
public boolean onScroll(android.view.MotionEvent e1, android.view.MotionEvent e2, float distanceX, float distanceY)- Specified by:
onScrollin interfaceandroid.view.GestureDetector.OnGestureListener
-
onLongPress
public void onLongPress(android.view.MotionEvent e)
- Specified by:
onLongPressin interfaceandroid.view.GestureDetector.OnGestureListener
-
onFling
public boolean onFling(android.view.MotionEvent e1, android.view.MotionEvent e2, float velocityX, float velocityY)- Specified by:
onFlingin interfaceandroid.view.GestureDetector.OnGestureListener
-
-