Java Code Examples for android.animation.ObjectAnimator#removeAllListeners()

The following examples show how to use android.animation.ObjectAnimator#removeAllListeners() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UDAnimator.java    From VideoOS-Android-SDK with GNU General Public License v3.0 5 votes vote down vote up
/**
 * setup listeners
 *
 * @param animator
 * @return
 */
public UDAnimator setupListeners(ObjectAnimator animator) {
    if (animator != null) {
        animator.removeAllListeners();//删除所有listener, pause listener
        animator.removeAllUpdateListeners();//删除所有update listener
        addAnimatorListener(animator);
        addOnPauseListener(animator);
        addOnUpdateListener(animator);
    }
    return this;
}
 
Example 2
Source File: StoryStatusView.java    From StatusStories with Apache License 2.0 5 votes vote down vote up
/**
 * Need to call when Activity or Fragment destroy
 */
public void destroy() {
    for (ObjectAnimator a : animators) {
        a.removeAllListeners();
        a.cancel();
    }
}
 
Example 3
Source File: AllAppsBackgroundDrawable.java    From Trebuchet with GNU General Public License v3.0 5 votes vote down vote up
private ObjectAnimator cancelAnimator(ObjectAnimator animator) {
    if (animator != null) {
        animator.removeAllListeners();
        animator.cancel();
    }
    return null;
}