CircleRefreshLayout
CircleRefreshLayout copied to clipboard
Quickly finish refreshing.
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.
Tested works great
@xuncl @wscheffer CircleRefreshLayout.finishRefreshing() the header view not back
@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();
}
int CircleRefreshLayout.java
private static final long BACK_TOP_DUR = 380; private static final long REL_DRAG_DUR = 100;