Java 类com.nineoldandroids.animation.Animator.AnimatorListener 实例源码

项目:boohee_v5.6    文件:AnimatorSet$AnimatorSetListener.java   
public void onAnimationCancel(Animator animation) {
    if (!this.this$0.mTerminated && AnimatorSet.access$000(this.this$0).size() == 0 && this
            .this$0.mListeners != null) {
        int numListeners = this.this$0.mListeners.size();
        for (int i = 0; i < numListeners; i++) {
            ((AnimatorListener) this.this$0.mListeners.get(i)).onAnimationCancel(this
                    .mAnimatorSet);
        }
    }
}
项目:boohee_v5.6    文件:AnimatorSet$AnimatorSetListener.java   
public void onAnimationEnd(Animator animation) {
    animation.removeListener(this);
    AnimatorSet.access$000(this.this$0).remove(animation);
    ((AnimatorSet$Node) AnimatorSet.access$100(this.mAnimatorSet).get(animation)).done = true;
    if (!this.this$0.mTerminated) {
        int i;
        ArrayList<AnimatorSet$Node> sortedNodes = AnimatorSet.access$200(this.mAnimatorSet);
        boolean allDone = true;
        int numSortedNodes = sortedNodes.size();
        for (i = 0; i < numSortedNodes; i++) {
            if (!((AnimatorSet$Node) sortedNodes.get(i)).done) {
                allDone = false;
                break;
            }
        }
        if (allDone) {
            if (this.this$0.mListeners != null) {
                ArrayList<AnimatorListener> tmpListeners = (ArrayList) this.this$0.mListeners
                        .clone();
                int numListeners = tmpListeners.size();
                for (i = 0; i < numListeners; i++) {
                    ((AnimatorListener) tmpListeners.get(i)).onAnimationEnd(this.mAnimatorSet);
                }
            }
            AnimatorSet.access$302(this.mAnimatorSet, false);
        }
    }
}
项目:boohee_v5.6    文件:AnimatorSet.java   
public void end() {
    this.mTerminated = true;
    if (isStarted()) {
        Iterator i$;
        if (this.mSortedNodes.size() != this.mNodes.size()) {
            sortNodes();
            i$ = this.mSortedNodes.iterator();
            while (i$.hasNext()) {
                Node node = (Node) i$.next();
                if (this.mSetListener == null) {
                    this.mSetListener = new AnimatorSetListener(this, this);
                }
                node.animation.addListener(this.mSetListener);
            }
        }
        if (this.mDelayAnim != null) {
            this.mDelayAnim.cancel();
        }
        if (this.mSortedNodes.size() > 0) {
            i$ = this.mSortedNodes.iterator();
            while (i$.hasNext()) {
                ((Node) i$.next()).animation.end();
            }
        }
        if (this.mListeners != null) {
            i$ = ((ArrayList) this.mListeners.clone()).iterator();
            while (i$.hasNext()) {
                ((AnimatorListener) i$.next()).onAnimationEnd(this);
            }
        }
        this.mStarted = false;
    }
}
项目:boohee_v5.6    文件:ValueAnimator.java   
private void start(boolean playBackwards) {
    if (Looper.myLooper() == null) {
        throw new AndroidRuntimeException("Animators may only be run on Looper threads");
    }
    this.mPlayingBackwards = playBackwards;
    this.mCurrentIteration = 0;
    this.mPlayingState = 0;
    this.mStarted = true;
    this.mStartedDelay = false;
    ((ArrayList) sPendingAnimations.get()).add(this);
    if (this.mStartDelay == 0) {
        setCurrentPlayTime(getCurrentPlayTime());
        this.mPlayingState = 0;
        this.mRunning = true;
        if (this.mListeners != null) {
            ArrayList<AnimatorListener> tmpListeners = (ArrayList) this.mListeners.clone();
            int numListeners = tmpListeners.size();
            for (int i = 0; i < numListeners; i++) {
                ((AnimatorListener) tmpListeners.get(i)).onAnimationStart(this);
            }
        }
    }
    AnimationHandler animationHandler = (AnimationHandler) sAnimationHandler.get();
    if (animationHandler == null) {
        animationHandler = new AnimationHandler(null);
        sAnimationHandler.set(animationHandler);
    }
    animationHandler.sendEmptyMessage(0);
}
项目:boohee_v5.6    文件:ValueAnimator.java   
public void cancel() {
    if (this.mPlayingState != 0 || ((ArrayList) sPendingAnimations.get()).contains(this) || (
            (ArrayList) sDelayedAnims.get()).contains(this)) {
        if (this.mRunning && this.mListeners != null) {
            Iterator i$ = ((ArrayList) this.mListeners.clone()).iterator();
            while (i$.hasNext()) {
                ((AnimatorListener) i$.next()).onAnimationCancel(this);
            }
        }
        endAnimation();
    }
}
项目:boohee_v5.6    文件:ValueAnimator.java   
private void endAnimation() {
    ((ArrayList) sAnimations.get()).remove(this);
    ((ArrayList) sPendingAnimations.get()).remove(this);
    ((ArrayList) sDelayedAnims.get()).remove(this);
    this.mPlayingState = 0;
    if (this.mRunning && this.mListeners != null) {
        ArrayList<AnimatorListener> tmpListeners = (ArrayList) this.mListeners.clone();
        int numListeners = tmpListeners.size();
        for (int i = 0; i < numListeners; i++) {
            ((AnimatorListener) tmpListeners.get(i)).onAnimationEnd(this);
        }
    }
    this.mRunning = false;
    this.mStarted = false;
}
项目:boohee_v5.6    文件:ValueAnimator.java   
private void startAnimation() {
    initAnimation();
    ((ArrayList) sAnimations.get()).add(this);
    if (this.mStartDelay > 0 && this.mListeners != null) {
        ArrayList<AnimatorListener> tmpListeners = (ArrayList) this.mListeners.clone();
        int numListeners = tmpListeners.size();
        for (int i = 0; i < numListeners; i++) {
            ((AnimatorListener) tmpListeners.get(i)).onAnimationStart(this);
        }
    }
}
项目:GongXianSheng    文件:BaseViewAnimator.java   
public BaseViewAnimator addAnimatorListener(AnimatorListener l) {
    mAnimatorSet.addListener(l);
    return this;
}
项目:GongXianSheng    文件:BaseViewAnimator.java   
public void removeAnimatorListener(AnimatorListener l) {
    mAnimatorSet.removeListener(l);
}
项目:boohee_v5.6    文件:ValueAnimator.java   
boolean animationFrame(long currentTime) {
    boolean done = false;
    if (this.mPlayingState == 0) {
        this.mPlayingState = 1;
        if (this.mSeekTime < 0) {
            this.mStartTime = currentTime;
        } else {
            this.mStartTime = currentTime - this.mSeekTime;
            this.mSeekTime = -1;
        }
    }
    switch (this.mPlayingState) {
        case 1:
        case 2:
            float fraction;
            if (this.mDuration > 0) {
                fraction = ((float) (currentTime - this.mStartTime)) / ((float) this.mDuration);
            } else {
                fraction = 1.0f;
            }
            if (fraction >= 1.0f) {
                if (this.mCurrentIteration < this.mRepeatCount || this.mRepeatCount == -1) {
                    if (this.mListeners != null) {
                        int numListeners = this.mListeners.size();
                        for (int i = 0; i < numListeners; i++) {
                            ((AnimatorListener) this.mListeners.get(i)).onAnimationRepeat(this);
                        }
                    }
                    if (this.mRepeatMode == 2) {
                        this.mPlayingBackwards = !this.mPlayingBackwards;
                    }
                    this.mCurrentIteration += (int) fraction;
                    fraction %= 1.0f;
                    this.mStartTime += this.mDuration;
                } else {
                    done = true;
                    fraction = Math.min(fraction, 1.0f);
                }
            }
            if (this.mPlayingBackwards) {
                fraction = 1.0f - fraction;
            }
            animateValue(fraction);
            break;
    }
    return done;
}
项目:boohee_v5.6    文件:ViewPropertyAnimatorHC.java   
public ViewPropertyAnimator setListener(AnimatorListener listener) {
    this.mListener = listener;
    return this;
}
项目:boohee_v5.6    文件:ViewPropertyAnimatorPreHC.java   
public ViewPropertyAnimator setListener(AnimatorListener listener) {
    this.mListener = listener;
    return this;
}
项目:AyoSunny    文件:BaseViewAnimator.java   
public BaseViewAnimator addAnimatorListener(AnimatorListener l) {
    mAnimatorSet.addListener(l);
    return this;
}
项目:AyoSunny    文件:BaseViewAnimator.java   
public void removeAnimatorListener(AnimatorListener l) {
    mAnimatorSet.removeListener(l);
}
项目:SqliteDB-Android-DEMO    文件:BaseViewAnimator.java   
public BaseViewAnimator addAnimatorListener(AnimatorListener l) {
    mAnimatorSet.addListener(l);
    return this;
}
项目:SqliteDB-Android-DEMO    文件:BaseViewAnimator.java   
public void removeAnimatorListener(AnimatorListener l) {
    mAnimatorSet.removeListener(l);
}
项目:android-smart-animation-library    文件:BaseViewAnimator.java   
public BaseViewAnimator addAnimatorListener(AnimatorListener l) {
    mAnimatorSet.addListener(l);
    return this;
}
项目:android-smart-animation-library    文件:BaseViewAnimator.java   
public void removeAnimatorListener(AnimatorListener l) {
    mAnimatorSet.removeListener(l);
}
项目:Kangapp    文件:BaseViewAnimator.java   
public BaseViewAnimator addAnimatorListener(AnimatorListener l) {
    mAnimatorSet.addListener(l);
    return this;
}
项目:Kangapp    文件:BaseViewAnimator.java   
public void removeAnimatorListener(AnimatorListener l) {
    mAnimatorSet.removeListener(l);
}
项目:iLocker    文件:BaseViewAnimator.java   
public BaseViewAnimator addAnimatorListener(AnimatorListener l) {
    mAnimatorSet.addListener(l);
    return this;
}
项目:iLocker    文件:BaseViewAnimator.java   
public void removeAnimatorListener(AnimatorListener l) {
    mAnimatorSet.removeListener(l);
}
项目:KUAS-AP    文件:BaseViewAnimator.java   
public BaseViewAnimator addAnimatorListener(AnimatorListener l) {
    mAnimatorSet.addListener(l);
    return this;
}
项目:KUAS-AP    文件:BaseViewAnimator.java   
public void removeAnimatorListener(AnimatorListener l) {
    mAnimatorSet.removeListener(l);
}
项目:KUAS-AP    文件:BaseViewAnimator.java   
public BaseViewAnimator addAnimatorListener(AnimatorListener l) {
    mAnimatorSet.addListener(l);
    return this;
}
项目:KUAS-AP    文件:BaseViewAnimator.java   
public void removeAnimatorListener(AnimatorListener l) {
    mAnimatorSet.removeListener(l);
}
项目:UltimateAndroid    文件:BaseViewAnimator.java   
public BaseViewAnimator addAnimatorListener(AnimatorListener l) {
    mAnimatorSet.addListener(l);
    return this;
}
项目:UltimateAndroid    文件:BaseViewAnimator.java   
public void removeAnimatorListener(AnimatorListener l) {
    mAnimatorSet.removeListener(l);
}
项目:TheSceneryAlong    文件:ProgressLoadingDialog.java   
/**
 * Animate.
 * 
 * @param progressBar
 *            the progress bar
 * @param listener
 *            the listener
 */
private void animate(final HoloCircularProgressBar progressBar, final AnimatorListener listener) {
    final float progress = (float) (Math.random() * 2);
    int duration = 3000;
    animate(progressBar, listener, progress, duration);
}
项目:boohee_v5.6    文件:ViewPropertyAnimator.java   
public abstract ViewPropertyAnimator setListener(AnimatorListener animatorListener);