Code example for GestureDetector

Methods: onTouchEvent

0
            } 
        }); 
 
        final OnTouchListener swipeTouchListener = new OnTouchListener() {
            public boolean onTouch(View v, MotionEvent event) {
                return swipeCalendarListener.onTouchEvent(event);
            } 
        }; 
 
        this.setOnTouchListener(swipeTouchListener);
    } 
 
    /** 
     * @see android.view.View#measure(int, int) 
     */ 
    @Override 
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        setMeasuredDimension(measureWidth(widthMeasureSpec),
                measureHeight(heightMeasureSpec));
    }