Skip to content

Commit

Permalink
fix 下拉刷新后不能再连续上拉
Browse files Browse the repository at this point in the history
  • Loading branch information
youlookwhat committed Dec 3, 2019
1 parent a122d90 commit d68c7e7
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,15 @@ private void initView(Context context) {
@Override
public void onMove(float delta) {
if (getVisibleHeight() > 0 || delta > 0) {
setVisibleHeight((int) delta + getVisibleHeight());
if (mState <= STATE_RELEASE_TO_REFRESH) {
if (getVisibleHeight() > mMeasuredHeight) {
setState(STATE_RELEASE_TO_REFRESH);
} else {
setState(STATE_NORMAL);
int visibleHeight = (int) delta + getVisibleHeight();
if (visibleHeight > 0) {
setVisibleHeight(visibleHeight);
if (mState <= STATE_RELEASE_TO_REFRESH) {
if (getVisibleHeight() > mMeasuredHeight) {
setState(STATE_RELEASE_TO_REFRESH);
} else {
setState(STATE_NORMAL);
}
}
}
}
Expand Down

0 comments on commit d68c7e7

Please sign in to comment.