Code example for ViewPager

Methods: getParent, onInterceptTouchEvent

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; 
	} 
}