CircularProgressBar icon indicating copy to clipboard operation
CircularProgressBar copied to clipboard

On Progress complete

Open evicoach opened this issue 3 years ago • 1 comments

How can one listen for when the progress is completed?

evicoach avatar Jun 09 '21 00:06 evicoach

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()

dobariyavishalpatel avatar Dec 01 '21 05:12 dobariyavishalpatel