public class MyViewPager extends ViewPager{
public MyViewPager(Context context) {
this(context, null);
// TODO Auto-generated constructor stub
}
public MyViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
// TODO Auto-generated constructor stub
}
public boolean onTouchEvent(MotionEvent arg0) {
// 当触碰ViewPager的时候,该方法触发
// 通知其父控件,现在进行的是本控件的操作,不允许拦截
getParent().requestDisallowInterceptTouchEvent(true);
return super.onTouchEvent(arg0);
}
}