Created
September 7, 2014 06:21
-
-
Save ejcer/6ea4ec83a034b5b6e008 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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