1

My app have a ViewPager, and I don't want to allow user to swipe between pages and I use this as my ViewPager:

public class ViewPager extends android.support.v4.view.ViewPager {

    public ViewPager(Context context) {
        super(context);
    }

    public ViewPager(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent event) {
        return false;
    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        return false;
    }
}

But I don't know why after use this ViewPager, my MotionEvent.ACTION_CANCEL is not working anymore and how to fix it. Please tell me why and give me some solutions about this. Thanks.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Bin Ky
  • 11
  • 4

0 Answers0