Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 867 Bytes

README.md

File metadata and controls

12 lines (9 loc) · 867 Bytes

CoroutinesPractice

This is a small project to practice using coroutines.

  1. Clone this project and import it into Android Studio
  2. Run the app on your device / emulator
  3. Notice that there are two buttons: one to increase the number shown, and one to start a 5 second timer.
    a) When you start the 5 second timer, notice that you can no longer click the button to increase the counter.
  4. Your goal is to use Coroutines so that users can start the timer and still be able to increase the counter. (see solution here: https://github.com/calren/CoroutinesPractice/pull/1/files)
  5. Now try moving the code to start the timer into a new ViewModel class. (see solution here: https://github.com/calren/CoroutinesPractice/pull/2/files)