Open evicoach opened 3 years ago
You need to add a count down timer when circle progress bar animation start like below code binding.progressBar.apply { progress = 0F val animationDuration = 60 1000 2 setProgressWithAnimation(100f, animationDuration) } object : CountDownTimer(60 1000 2, 1000) { override fun onTick(millisUntilFinished: Long) { val currentProgress = (String.format( "%02d:%02d", TimeUnit.MILLISECONDS.toMinutes(millisUntilFinished), TimeUnit.MILLISECONDS.toSeconds(millisUntilFinished) - TimeUnit.MINUTES.toSeconds( TimeUnit.MILLISECONDS.toMinutes( millisUntilFinished ) ) )) binding.tvProgress.text = currentProgress }
override fun onFinish() {
binding.tvResend.visible()
}
}.start()
How can one listen for when the progress is completed?