Countdowntimer in Android implements the countdown function
CountDownTimer
Countdowntimer is an Android built-in countdown class. Using this class, you can easily implement the countdown function
Implementation of countdowntimer
Realization effect
Cancel timer
Calling the cancel () method of countdowntimer can cancel the timer for us: however, this method has effect only when it is above Android 5.0, but it has no effect below Android 5.0. If we need to use cancel in systems below Android 5.0, we need to re implement it according to the implementation method in the countdowntimer source code.
Due to the addition of one above Android 5.0
So we only need to remove it in systems below 5.0
Just remove this judgment.
The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.