Code example for ViewPager

Methods: onTouchEvent

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