當前位置: 首頁>>代碼示例>>Java>>正文


Java AnimatorListener類代碼示例

本文整理匯總了Java中com.nineoldandroids.animation.Animator.AnimatorListener的典型用法代碼示例。如果您正苦於以下問題:Java AnimatorListener類的具體用法?Java AnimatorListener怎麽用?Java AnimatorListener使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AnimatorListener類屬於com.nineoldandroids.animation.Animator包,在下文中一共展示了AnimatorListener類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onAnimationCancel

import com.nineoldandroids.animation.Animator.AnimatorListener; //導入依賴的package包/類
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);
        }
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:11,代碼來源:AnimatorSet$AnimatorSetListener.java

示例2: onAnimationEnd

import com.nineoldandroids.animation.Animator.AnimatorListener; //導入依賴的package包/類
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);
        }
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:29,代碼來源:AnimatorSet$AnimatorSetListener.java

示例3: end

import com.nineoldandroids.animation.Animator.AnimatorListener; //導入依賴的package包/類
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;
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:34,代碼來源:AnimatorSet.java

示例4: start

import com.nineoldandroids.animation.Animator.AnimatorListener; //導入依賴的package包/類
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);
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:30,代碼來源:ValueAnimator.java

示例5: cancel

import com.nineoldandroids.animation.Animator.AnimatorListener; //導入依賴的package包/類
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();
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:13,代碼來源:ValueAnimator.java

示例6: endAnimation

import com.nineoldandroids.animation.Animator.AnimatorListener; //導入依賴的package包/類
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;
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:16,代碼來源:ValueAnimator.java

示例7: startAnimation

import com.nineoldandroids.animation.Animator.AnimatorListener; //導入依賴的package包/類
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);
        }
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:12,代碼來源:ValueAnimator.java

示例8: addAnimatorListener

import com.nineoldandroids.animation.Animator.AnimatorListener; //導入依賴的package包/類
public BaseViewAnimator addAnimatorListener(AnimatorListener l) {
	mAnimatorSet.addListener(l);
	return this;
}
 
開發者ID:ebridfighter,項目名稱:GongXianSheng,代碼行數:5,代碼來源:BaseViewAnimator.java

示例9: removeAnimatorListener

import com.nineoldandroids.animation.Animator.AnimatorListener; //導入依賴的package包/類
public void removeAnimatorListener(AnimatorListener l) {
	mAnimatorSet.removeListener(l);
}
 
開發者ID:ebridfighter,項目名稱:GongXianSheng,代碼行數:4,代碼來源:BaseViewAnimator.java

示例10: animationFrame

import com.nineoldandroids.animation.Animator.AnimatorListener; //導入依賴的package包/類
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;
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:48,代碼來源:ValueAnimator.java

示例11: setListener

import com.nineoldandroids.animation.Animator.AnimatorListener; //導入依賴的package包/類
public ViewPropertyAnimator setListener(AnimatorListener listener) {
    this.mListener = listener;
    return this;
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:5,代碼來源:ViewPropertyAnimatorHC.java

示例12: addAnimatorListener

import com.nineoldandroids.animation.Animator.AnimatorListener; //導入依賴的package包/類
public BaseViewAnimator addAnimatorListener(AnimatorListener l) {
    mAnimatorSet.addListener(l);
    return this;
}
 
開發者ID:cowthan,項目名稱:AyoSunny,代碼行數:5,代碼來源:BaseViewAnimator.java

示例13: removeAnimatorListener

import com.nineoldandroids.animation.Animator.AnimatorListener; //導入依賴的package包/類
public void removeAnimatorListener(AnimatorListener l) {
    mAnimatorSet.removeListener(l);
}
 
開發者ID:cowthan,項目名稱:AyoSunny,代碼行數:4,代碼來源:BaseViewAnimator.java

示例14: animate

import com.nineoldandroids.animation.Animator.AnimatorListener; //導入依賴的package包/類
/**
 * 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);
}
 
開發者ID:jp1017,項目名稱:TheSceneryAlong,代碼行數:14,代碼來源:ProgressLoadingDialog.java

示例15: setListener

import com.nineoldandroids.animation.Animator.AnimatorListener; //導入依賴的package包/類
public abstract ViewPropertyAnimator setListener(AnimatorListener animatorListener); 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:2,代碼來源:ViewPropertyAnimator.java


注:本文中的com.nineoldandroids.animation.Animator.AnimatorListener類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。