Code example for ViewPager

Methods: onInterceptTouchEvent

0
    } 
 
    @Override 
    public boolean onInterceptTouchEvent(MotionEvent event) { 
        if (this.enabled) { 
            return super.onInterceptTouchEvent(event); 
        } 
 
        return false; 
    } 
 
    public void setPagingEnabled(boolean enabled) { 
        this.enabled = enabled; 
    } 
}