Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quickly finish refreshing. #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Quickly finish refreshing. #13

wants to merge 1 commit into from

Conversation

xuncl
Copy link

@xuncl xuncl commented Mar 4, 2016

If the user stops the freshing by CircleRefreshLayout.finishRefreshing() immediately after the refresh starts, the method AnimationView.startOutCir() will run after that and will reset the boolean AnimationView.mIsRefreshing as true again. Then the refreshing drawing will never stop.
In this pr, the problem can be solved and make no damage to the animation effect.

If stop the freshing too quick, the method getOutRatio() will reset the
boolean mIsRefreshing as true again. Then the refreshing would never
stop. This can solve the problem.
@wscheffer
Copy link

Tested works great

@tosslife
Copy link

tosslife commented Apr 8, 2016

@xuncl @wscheffer CircleRefreshLayout.finishRefreshing() the header view not back

@kfarst
Copy link

kfarst commented Jul 24, 2016

@xuncl @wscheffer I believe you should change:

        if (!mIsRefreshing) {
            applyDone();
        }

        if (isQuickStop){
            mIsRefreshing = false;
            isQuickStop = false;
        }

to

        if (isQuickStop){
            mIsRefreshing = false;
            isQuickStop = false;
        }

        if (!mIsRefreshing) {
            applyDone();
        }

@fanrunqi
Copy link

int CircleRefreshLayout.java

private static final long BACK_TOP_DUR = 380;
private static final long REL_DRAG_DUR = 100;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants