admin
2021-05-11 e5ca87e89fef96c827ec37d1d91082f626cbb17d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package com.tejia.lijin.app.util.view;
 
import android.content.Context;
import androidx.viewpager.widget.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;
 
/**
 * Created by weikou2015 on 2018/8/23.
 */
 
public class PhotoViewPager extends ViewPager {
 
 
    public PhotoViewPager(Context context) {
        super(context);
    }
 
    public PhotoViewPager(Context context, AttributeSet attrs) {
        super(context, attrs);
    }
 
    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        try {
            return super.onInterceptTouchEvent(ev);
        } catch (IllegalArgumentException e) {
            e.printStackTrace();
        } catch (ArrayIndexOutOfBoundsException e) {
            e.printStackTrace();
        }
        return false;
    }
 
}