Code example for ViewPager

Methods: getParent, onInterceptTouchEvent

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