Skip to content

Commit 83815dc

Browse files
committed
[fix]:解决刷新结束无限回调导致内存溢出的bug
1 parent adda2bb commit 83815dc

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed
0 Bytes
Binary file not shown.

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
4+
55
repositories {
66
google()
77
jcenter()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.2.0'
10+
classpath 'com.android.tools.build:gradle:3.2.1'
1111
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0' // Add this line
1212
// NOTE: Do not place your application dependencies here; they belong
1313
// in the individual module build.gradle files

library/src/main/java/com/github/kilnn/refreshloadlayout/RefreshLoadLayout.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,7 @@ private void notifyRefreshOrReset() {
713713
}
714714

715715
private void reset() {
716+
mRefreshAnimation.setAnimationListener(null);
716717
mRefreshAnimation.reset();
717718
mRefreshAnimation.cancel();
718719
clearAnimation();
@@ -728,6 +729,7 @@ private void refreshAnimate(@AnimationType int type) {
728729
//reset at first, so the mListenerHandler in Animation can be null.
729730
//And when you call cancel(), the previous animation can get onAnimationEnd() callback before
730731
//we change the mRefreshAnimationType.
732+
mRefreshAnimation.setAnimationListener(null);
731733
mRefreshAnimation.reset();
732734
mRefreshAnimation.cancel();
733735

0 commit comments

Comments
 (0)