Code example for ViewPager

Methods: onTouchEvent

0
	} 
 
	@Override 
	public boolean onTouchEvent(final MotionEvent event) { 
		if (!mPagingEnabled) return false; 
		return super.onTouchEvent(event); 
	} 
 
	public void setPagingEnabled(final boolean enabled) { 
		mPagingEnabled = enabled; 
	} 
}