private final ViewGroup mHeader;
private final ViewGroup mFooter;
private int mHeaderMeasuredHeight;
private int mFooterMeasuredHeight;
private View mDragContentView;
private float lastY;
private float deltaY;
private OnPullListener onPullListener;
private boolean up = false; //上拉
private boolean down = false; //下拉
private boolean canUp = true;
private boolean canDown = true;
private static final float SWIPE_BACK_FACTOR = 0.9f;
private float swipeBackFraction;
public PullSlideParent(Context context) {
this(context, null);
}
public PullSlideParent(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public PullSlideParent(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
mDragHelper = ViewDragHelper.create(this, new PullSlideParent.DragHelpe