Java 类android.animation.TimeAnimator.TimeListener 实例源码

项目:NoticeDog    文件:PanelView.java   
void init() {
    this.handler = new Handler(Looper.getMainLooper());
    this.mAnimationCallback = new TimeListener() {
        public void onTimeUpdate(TimeAnimator animation, long totalTime, long deltaTime) {
            PanelView.this.animationTick(deltaTime);
        }
    };
    this.mStopAnimator = new Runnable() {
        public void run() {
            if (PanelView.this.mTimeAnimator != null && PanelView.this.mTimeAnimator.isStarted()) {
                PanelView.this.LOG("Stop Animator : stopping", new Object[0]);
                PanelView.this.mTimeAnimator.end();
                PanelView.this.mRubberbanding = false;
                PanelView.this.mClosing = false;
            }
        }
    };
    this.mTimeAnimator = new TimeAnimator();
    this.mTimeAnimator.setTimeListener(this.mAnimationCallback);
}
项目:android-chromium-view    文件:GenericTouchGesture.java   
private Runnable createJBRunnable() {
    // On JB, we rely on TimeAnimator to send events tied with vsync.
    return new Runnable() {
        @Override
        public void run() {
            mTimeAnimator = new TimeAnimator();
            mTimeAnimator.setTimeListener(new TimeListener() {
                @Override
                public void onTimeUpdate(TimeAnimator animation, long totalTime,
                        long deltaTime) {
                    if (!sendEvent(mDownTime + totalTime)) {
                        mTimeAnimator.end();
                    }
                }
            });
            mTimeAnimator.start();
        }
    };
}
项目:android-chromium    文件:GenericTouchGesture.java   
private Runnable createJBRunnable() {
    // On JB, we rely on TimeAnimator to send events tied with vsync.
    return new Runnable() {
        @Override
        public void run() {
            mTimeAnimator = new TimeAnimator();
            mTimeAnimator.setTimeListener(new TimeListener() {
                @Override
                public void onTimeUpdate(TimeAnimator animation, long totalTime,
                        long deltaTime) {
                    if (!sendEvent(mStartTime + totalTime)) {
                        mTimeAnimator.end();
                    }
                }
            });
            mTimeAnimator.start();
        }
    };
}
项目:chromium_webview    文件:GenericTouchGesture.java   
private Runnable createJBRunnable() {
    // On JB, we rely on TimeAnimator to send events tied with vsync.
    return new Runnable() {
        @Override
        public void run() {
            mTimeAnimator = new TimeAnimator();
            mTimeAnimator.setTimeListener(new TimeListener() {
                @Override
                public void onTimeUpdate(TimeAnimator animation, long totalTime,
                        long deltaTime) {
                    if (!sendEvent(mDownTime + totalTime)) {
                        mTimeAnimator.end();
                    }
                }
            });
            mTimeAnimator.start();
        }
    };
}
项目:cordova-android-chromium    文件:GenericTouchGesture.java   
private Runnable createJBRunnable() {
    // On JB, we rely on TimeAnimator to send events tied with vsync.
    return new Runnable() {
        @Override
        public void run() {
            mTimeAnimator = new TimeAnimator();
            mTimeAnimator.setTimeListener(new TimeListener() {
                @Override
                public void onTimeUpdate(TimeAnimator animation, long totalTime,
                        long deltaTime) {
                    if (!sendEvent(mStartTime + totalTime)) {
                        mTimeAnimator.end();
                    }
                }
            });
            mTimeAnimator.start();
        }
    };
}