Code example for CountDownTimer

Methods: cancel

0
        mState = STATE_RUNNING;
    } 
 
    public void stopCountDown() { 
        if ( mTimer != null ) {
            mTimer.cancel();
            mTimer = null;
        } 
        mState = STATE_PAUSED;
    } 
 
    public void resetCountDown() { 
        mState = STATE_RESET;
    } 
 
    protected void notifyClient( long millisRemain ) {
        if ( mClient != null ) {
            mClient.onTick( millisRemain );
        } 
    }