Code example for TimeAnimator

Methods: setTimeListenerstart

        // On JB, we rely on TimeAnimator to send events tied with vsync. 
        return new Runnable() {
            public void run() { 
                mTimeAnimator = new TimeAnimator();
                mTimeAnimator.setTimeListener(new TimeListener() {
                    public void onTimeUpdate(TimeAnimator animation, long totalTime,
                            long deltaTime) {
                        if (!sendEvent(mDownTime + totalTime)) {
    private Runnable createPreJBRunnable() {
        // Pre-JB there's no TimeAnimator, so we keep posting messages. 
Stop searching for code, let great code find you!  Add Codota to your java IDE