Code example for ViewPager

Methods: onInterceptTouchEvent, getParent

0
		super(context, attrs); 
	} 
 
	public boolean onInterceptTouchEvent(MotionEvent ev) { 
		// Tell our parent to stop intercepting our events! 
		boolean ret = super.onInterceptTouchEvent(ev); 
		if (ret) { 
			getParent().requestDisallowInterceptTouchEvent(true); 
		} 
		return ret; 
	} 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE