42 lines
1.1 KiB
Java
42 lines
1.1 KiB
Java
package com.ubt.jimu.utils;
|
|
|
|
import android.content.Context;
|
|
import android.util.AttributeSet;
|
|
import android.view.MotionEvent;
|
|
import androidx.viewpager.widget.ViewPager;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class CustomViewPager extends ViewPager {
|
|
private boolean k0;
|
|
|
|
public CustomViewPager(Context context) {
|
|
super(context);
|
|
this.k0 = false;
|
|
}
|
|
|
|
@Override // androidx.viewpager.widget.ViewPager, android.view.ViewGroup
|
|
public boolean onInterceptTouchEvent(MotionEvent motionEvent) {
|
|
if (this.k0) {
|
|
return super.onInterceptTouchEvent(motionEvent);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
@Override // androidx.viewpager.widget.ViewPager, android.view.View
|
|
public boolean onTouchEvent(MotionEvent motionEvent) {
|
|
if (this.k0) {
|
|
return super.onTouchEvent(motionEvent);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public void setScanScroll(boolean z) {
|
|
this.k0 = z;
|
|
}
|
|
|
|
public CustomViewPager(Context context, AttributeSet attributeSet) {
|
|
super(context, attributeSet);
|
|
this.k0 = false;
|
|
}
|
|
}
|