admin
2021-07-28 c0269fcfa876b9c5cf309b2006462b4d09c5ef95
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
36
37
38
39
40
41
42
43
package com.hanju.video.app.widget;
 
import android.content.Context;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import android.util.AttributeSet;
 
/**
 * Created by weikou2015 on 2016/10/24.
 */
 
public class MyRefreshLayout extends SwipeRefreshLayout {
 
 
    /**
     * 按下时的y坐标
     */
    private float mYDown;
    private float mXDown;
    /**
     * 抬起时的y坐标, 与mYDown一起用于滑动到底部时判断是上拉还是下拉
     */
    private float mLastY;
    private float mLastX;
    private boolean mIsVpDragger;
 
    /**
     * @param context
     */
    public MyRefreshLayout(Context context) {
        this(context, null);
    }
 
    public MyRefreshLayout(Context context, AttributeSet attrs) {
        super(context, attrs);
    }
 
 
    @Override
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        super.onLayout(changed, left, top
                , right, bottom);
    }
}