Code example for TimeAnimator

Methods: cancel, start

0
                        reset(); 
                        startAnimation(); 
                    } 
                }); 
            } else { 
                mAnim.start();
            } 
        } 
 
        public void stopAnimation() { 
            if (mAnim != null)
                mAnim.cancel();
        } 
 
        public void clearAnimation() { 
            mAnim = null;
        } 
 
        @Override 
        protected void onDetachedFromWindow() { 
            super.onDetachedFromWindow();