Skip to content

Instantly share code, notes, and snippets.

@ejcer
Created September 7, 2014 06:21
Show Gist options
  • Save ejcer/6ea4ec83a034b5b6e008 to your computer and use it in GitHub Desktop.
Save ejcer/6ea4ec83a034b5b6e008 to your computer and use it in GitHub Desktop.
package com.noteworthy;
import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;
public class HackyViewPager extends ViewPager {
public HackyViewPager(Context context) {
super(context);
}
public HackyViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
try {
return super.onInterceptTouchEvent(ev);
} catch (IllegalArgumentException e) {
e.printStackTrace();
return false;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment