Code example for TimeAnimator

Methods: setTimeListener

0
            } 
 
            if (mAnim != null) {
                mAnim.cancel();
            } 
            mAnim = new TimeAnimator();
            mAnim.setTimeListener(new TimeAnimator.TimeListener() {
                public void onTimeUpdate(TimeAnimator animation, long totalTime, long deltaTime) {
                    if (DEBUG) {
                        for (int i=0; i<getChildCount(); i++) {
                            android.util.Log.d("CIDCircus", "cid " + i + ": " + getChildAt(i));
                        } 
                    } 
 
                    for (int i=0; i<getChildCount(); i++) {
                        View v = getChildAt(i);
                        if (!(v instanceof CID)) continue;
                        CID nv = (CID) v;
                        nv.update(deltaTime / 1000f);
 
                        for (int j=i+1; j<getChildCount(); j++) {