Code example for ViewPager

0
import android.view.MotionEvent; 
 
public class PhotupViewPager extends ViewPager { 
 
	public PhotupViewPager(Context context, AttributeSet attrs) { 
		super(context, attrs); 
	} 
 
	@Override 
	public boolean onInterceptTouchEvent(MotionEvent ev) { 
		try { 
			return super.onInterceptTouchEvent(ev); 
		} catch (Exception e) { 
			return false; 
		} 
	} 
 
	@Override 
	public boolean onTouchEvent(MotionEvent ev) { 
		try { 
			return super.onTouchEvent(ev);