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) {
 
                    for (int i = 0; i < getChildCount(); i++) {
                        View v = getChildAt(i);
                        if (!(v instanceof Mob))
                            continue; 
                        Mob nv = (Mob) v;
                        nv.update(deltaTime / mSpeedOfMobs);
 
                        if (mIsRotationEnabled) {
                            nv.setRotation(nv.a);
                        } else { 
Contextual code suggestions in your IDE  Get Codota for Java