Class ModalContentPanGestureDetector

    • Constructor Detail

      • ModalContentPanGestureDetector

        public ModalContentPanGestureDetector​(android.content.Context context,
                                              boolean allowHorizontalPanning)
    • 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 panable
        effectsView - View to apply the visual effects on
      • dismiss

        public void dismiss()
      • onTouchEvent

        public boolean onTouchEvent​(android.view.MotionEvent event,
                                    DelegatedTouchEventViewGroup source,
                                    boolean wantsCancellationOnInterception)
        Description copied from interface: DelegatedTouchEventViewGroup.Delegate
        Delegated View.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:
        onTouchEvent in interface DelegatedTouchEventViewGroup.Delegate
      • onDown

        public boolean onDown​(android.view.MotionEvent e)
        Specified by:
        onDown in interface android.view.GestureDetector.OnGestureListener
      • onShowPress

        public void onShowPress​(android.view.MotionEvent e)
        Specified by:
        onShowPress in interface android.view.GestureDetector.OnGestureListener
      • onSingleTapUp

        public boolean onSingleTapUp​(android.view.MotionEvent e)
        Specified by:
        onSingleTapUp in interface android.view.GestureDetector.OnGestureListener
      • onScroll

        public boolean onScroll​(android.view.MotionEvent e1,
                                android.view.MotionEvent e2,
                                float distanceX,
                                float distanceY)
        Specified by:
        onScroll in interface android.view.GestureDetector.OnGestureListener
      • onLongPress

        public void onLongPress​(android.view.MotionEvent e)
        Specified by:
        onLongPress in interface android.view.GestureDetector.OnGestureListener
      • onFling

        public boolean onFling​(android.view.MotionEvent e1,
                               android.view.MotionEvent e2,
                               float velocityX,
                               float velocityY)
        Specified by:
        onFling in interface android.view.GestureDetector.OnGestureListener