package com.yeshi.makemoney.video.app.ui.subview;
|
|
import android.content.Context;
|
import android.util.AttributeSet;
|
|
|
import com.yeshi.makemoney.video.R;
|
|
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
|
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);
|
setColorSchemeColors(getResources().getColor(R.color.refresh_color));
|
}
|
|
|
@Override
|
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
|
super.onLayout(changed, left, top
|
, right, bottom);
|
}
|
}
|