Code example for Handler

Methods: removeCallbacks

0
        } 
 
        @Override 
        public void onDestroy() { 
            super.onDestroy(); 
            mHandler.removeCallbacks(mDrawWallpaper);
        } 
 
        @Override 
        public void onVisibilityChanged(boolean visible) {
            mVisible = visible;
            if (visible) {
                drawFrame(); 
            } else { 
                mHandler.removeCallbacks(mDrawWallpaper);
            } 
        } 
 
        @Override 
        public void onSurfaceChanged(SurfaceHolder holder, int format, int width, int height) {
            super.onSurfaceChanged(holder, format, width, height);