Code example for TimeAnimator

Methods: cancel

0
                } }); 
            } else { 
                mAnim.start();
            } 
        } 
 
        public void stopAnimation() { 
            if (mAnim != null) mAnim.cancel();
        } 
 
        @Override 
        protected void onDetachedFromWindow() { 
            super.onDetachedFromWindow(); 
            stopAnimation(); 
        } 
 
        @Override 
        public boolean isOpaque() { 
            return false; 
        }