what-the-bank/sources/com/scb/phone/view/custom/common/NonSwipeableViewPager.java

50 lines
1.3 KiB
Java

package com.scb.phone.view.custom.common;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import androidx.viewpager.widget.ViewPager;
/* loaded from: classes5.dex */
public class NonSwipeableViewPager extends ViewPager {
private boolean b;
public NonSwipeableViewPager(Context context) {
super(context);
this.b = false;
}
public NonSwipeableViewPager(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.b = false;
}
@Override // androidx.viewpager.widget.ViewPager, android.view.View
public boolean canScrollHorizontally(int i) {
if (this.b) {
return false;
}
return super.canScrollHorizontally(i);
}
@Override // androidx.viewpager.widget.ViewPager, android.view.View
public boolean onTouchEvent(MotionEvent motionEvent) {
if (this.b) {
return false;
}
return super.onTouchEvent(motionEvent);
}
@Override // androidx.viewpager.widget.ViewPager, android.view.ViewGroup
public boolean onInterceptTouchEvent(MotionEvent motionEvent) {
if (this.b) {
return false;
}
return super.onInterceptTouchEvent(motionEvent);
}
public void setDisableSwiping(boolean z) {
this.b = z;
}
}