Code example for Handler: Scheduling a delayed task

Methods: postDelayedremoveCallbacks

0
                } 
            } finally { 
                if (c != null) holder.unlockCanvasAndPost(c);
            } 
 
            mHandler.removeCallbacks(mDrawClock);
            if (mVisible) {
                if (mShowSeconds) {
                    mHandler.postDelayed(mDrawClock, 1000 / 25);
                } else { 
                    // If we aren't showing seconds, we don't need to update 
                    // nearly as often. 
                    mHandler.postDelayed(mDrawClock, 2000);
                } 
            } 
        } 
    } 
} 
Connect your IDE to all the code out there  Get Codota for Java