Skip to content

Instantly share code, notes, and snippets.

@gvr23
Created January 24, 2018 20:42
Show Gist options
  • Save gvr23/90ceb8173723adbb7ac4f0faf97406ae to your computer and use it in GitHub Desktop.
Save gvr23/90ceb8173723adbb7ac4f0faf97406ae to your computer and use it in GitHub Desktop.
eliminate the touch event from the View Pager
package dsbmobile.com.drokasa.liquidacion.activity;
import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;
/**
* Created by giova on 1/24/2018.
*/
public class CustomViewPager extends ViewPager {
public CustomViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
return false;
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment