Skip to content

Commit

Permalink
初步完成autoOpen完整算法
Browse files Browse the repository at this point in the history
  • Loading branch information
scwang90 committed Nov 4, 2022
1 parent 720cc75 commit c0f84fa
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3439,6 +3439,13 @@ public void run() {
mLastTouchX = thisView.getMeasuredWidth() / 2f;
mKernel.setState(RefreshState.PullUpToLoad);

if (mRefreshFooter != null && mRefreshFooter.autoOpen(duration, dragRate, animationOnly)) {
/*
* 2022-11-03 添加Header可以自己实现 autoOpen ,返回true表示支持,返回False表示不支持,使用老版本的 autoOpen
*/
return;
}

final float height = mFooterHeight == 0 ? mFooterTriggerRate : mFooterHeight;
final float dragHeight = dragRate < 10 ? dragRate * height : dragRate;
reboundAnimator = ValueAnimator.ofInt(mSpinner, - (int) (dragHeight));
Expand Down

0 comments on commit c0f84fa

Please sign in to comment.