Code example for ViewPager

Methods: onInterceptTouchEvent, getParent

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; 
    } 
} 
Experience pair programming with AI  Get Codota for Java