Created
April 17, 2020 15:28
-
-
Save stefanJi/cc43657c2674895b76dd7bedf3c8b5a8 to your computer and use it in GitHub Desktop.
animator_cancel_7
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<Animator> playingSet = new ArrayList<>(mPlayingSet); | |
int setSize = playingSet.size(); | |
for (int i = 0; i < setSize; i++) { | |
playingSet.get(i).cancel(); | |
} | |
if (tmpListeners != null) { | |
int size = tmpListeners.size(); | |
for (int i = 0; i < size; i++) { | |
tmpListeners.get(i).onAnimationEnd(this); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment