Countdown Timer Part 4 – ENTER A TIME – Android Studio Tutorial
In part 4 of the CountDownTimer tutorial we will add an EditText field where the user can type in the amount of minutes he wants to set the timer to.
We will set the inputType of this EditText to « number », parse the input to a long variable by using the Long.parseInt method, and then set it as the time on our CountDownTimer.
Besides that we will add another field for the hours to our String.format method, which will only be visible if there are at least 60 minutes left.
Watch the whole playlist:
Code for this part:
https://gist.github.com/codinginflow/ad9042bdaa712bdbc361a0b697179367
____________________
💻 Find the BEST programming tutorials on TutHub:
https://tuthub.io
⭐ Get my MVVM Caching Course now:
https://codinginflow.com/caching
❗ Subscribe to the channel:
https://www.youtube.com/c/codinginflo…
📨 Subscribe to the Coding in Flow newsletter:
https://codinginflow.com/newsletter
❓ Join our free developer community:
https://discord.gg/TSnMvmc
📣 Follow Coding in Flow on other sites:
Facebook: https://www.facebook.com/codinginflow
Instagram: https://www.instagram.com/codinginflow
TikTok: https://www.tiktok.com/@codinginflow
Twitter: https://twitter.com/codinginflow
Github: https://github.com/codinginflow
💰 Business requests, sponsoring, etc.: info@codinginflow.com
Views :35812
android studio