Last active
April 17, 2020 15:28
-
-
Save stefanJi/d16dbaa0cf2eac49f643edb239498faa to your computer and use it in GitHub Desktop.
animator_cancel_android_8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void cancel() { | |
if (isStarted()) { | |
ArrayList<AnimatorListener> tmpListeners = null; | |
if (mListeners != null) { | |
tmpListeners = (ArrayList<AnimatorListener>) mListeners.clone(); | |
int size = tmpListeners.size(); | |
for (int i = 0; i < size; i++) { | |
tmpListeners.get(i).onAnimationCancel(this); | |
} | |
} | |
ArrayList<Node> playingSet = new ArrayList<>(mPlayingSet); | |
int setSize = playingSet.size(); | |
for (int i = 0; i < setSize; i++) { | |
playingSet.get(i).mAnimation.cancel(); | |
} | |
mPlayingSet.clear(); | |
endAnimation(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment