34 lines
807 B
Java
34 lines
807 B
Java
package com.utopiaindustries.qualitychecker.utils;
|
|
|
|
import android.content.Context;
|
|
import android.util.AttributeSet;
|
|
import android.view.MotionEvent;
|
|
|
|
import androidx.viewpager.widget.ViewPager;
|
|
|
|
/**
|
|
* Created by Development on 05-Oct-2021.
|
|
*/
|
|
public class NonSwipeableViewPager extends ViewPager
|
|
{
|
|
public NonSwipeableViewPager(Context context) {
|
|
super(context);
|
|
}
|
|
|
|
public NonSwipeableViewPager(Context context, AttributeSet attrs) {
|
|
super(context, attrs);
|
|
}
|
|
|
|
@Override
|
|
public boolean onInterceptTouchEvent(MotionEvent event) {
|
|
// Never allow swiping to switch between pages
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public boolean onTouchEvent(MotionEvent event) {
|
|
// Never allow swiping to switch between pages
|
|
return false;
|
|
}
|
|
}
|