Kotlin CountDownTimer Example
Code :
private fun countDownTimer() {
val timer = object : CountDownTimer(5000, 1000) {
override fun onTick(millisUntilFinished: Long) {
}
override fun onFinish() {
Toast.makeText(
applicationContext,
"CountDownTimer Finish",
Toast.LENGTH_SHORT
).show()
}
}
timer.start()
}
Comments
Post a Comment