Code example for ViewPager

Methods: onInterceptTouchEvent

0
    } 
 
    @Override 
    public boolean onInterceptTouchEvent(MotionEvent event) {
        if (isGesturesEnabled()) { 
            return super.onInterceptTouchEvent(event);
        } 
 
        return false; 
    } 
 
    boolean isGesturesEnabled() 
    { 
        return handler == null ? true : handler.isEnabled();
    } 
 
    public void setGesturesEnabledHandler(GesturesEnabledHandler handler) {
        this.handler = handler;
    } 
 
    public static interface GesturesEnabledHandler