use of android.animation.TimeAnimator.TimeListener in project chromeview by pwnall.
the class SmoothScroller method createJBRunnable.
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();
}
};
}
Aggregations