倒计时+1
This commit is contained in:
@@ -20,7 +20,7 @@ class PlateCabinetFullFragment :
|
||||
fun initCountTime() {
|
||||
object : CountDownTimer(totalTimeInMillis, 1000) {
|
||||
override fun onTick(millisUntilFinished: Long) {
|
||||
binding.tvAutoClose.text = "${(millisUntilFinished / 1000).toInt()}秒后返回主屏"
|
||||
binding.tvAutoClose.text = "${(millisUntilFinished / 1000).toInt() + 1}秒后返回主屏"
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
|
||||
@@ -55,7 +55,7 @@ class PlateOpenFragment :
|
||||
fun initCountTime() {
|
||||
object : CountDownTimer(totalTimeInMillis, 1000) {
|
||||
override fun onTick(millisUntilFinished: Long) {
|
||||
binding.tvAutoClose.text = (millisUntilFinished / 1000).toInt().toString()
|
||||
binding.tvAutoClose.text = ((millisUntilFinished / 1000).toInt() + 1).toString()
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
|
||||
Reference in New Issue
Block a user