On creating a timer In Android Studio Kotlin.
I'd like to display the time value as it's 2 digit number like '01:04:07'.
Please see the below.
At this point, how do I change the code?
Simply use String.format()
like:
timerDisplay.text = String.format("%02d:%02d:%02d", lapsHours, lapsMinutes, lapsSeconds)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With