Code example for TimeAnimator

Methods: start

0
        @Override 
        protected void onSizeChanged (int w, int h, int oldw, int oldh) {
            super.onSizeChanged(w,h,oldw,oldh);
            post(new Runnable() { public void run() { 
                reset(); 
                mAnim.start();  
            } }); 
        } 
 
 
        @Override 
        protected void onDetachedFromWindow() { 
            super.onDetachedFromWindow(); 
            mAnim.cancel(); 
        } 
 
        @Override 
        public boolean isOpaque() { 
            return true; 
        } 
    }