Android Countdown Timer Circular Progress Bar doesn't match with timer

后端 未结 1 1857
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-06 06:17

Hi can anyone help me on my small project please, I have been following this Tutorial and I got to the part where I insert 1 Minute into the EditText the Progress Bar works fine

相关标签:
1条回答
  • 2021-02-06 07:04

    In your main.xml, for ProgressBar you mentioned max value as 60. So the progress bar takes it max value as 60 and your progress bar starts decreasing from 60 seconds onwards.

    Instead of that to work your Progress bar properly all times, in your "setTimer()" method write the below line.

    mProgressBar.setMax(60*time);
    
    0 讨论(0)
提交回复
热议问题