All days
Day 10Module 5 · Persistence· 5–7 hrs
Room II — CRUD, Coroutines, WorkManager, Notifications, DI
Complete the ToDo app: edit/delete, coroutines for async, WorkManager for a scheduled reminder notification, and DI (Hilt) to wire it all up cleanly.
0% done
Key concepts
- AlertDialog & PopupMenu for delete confirmations
- Coroutines (viewModelScope, suspend, Dispatchers.IO)
- WorkManager (OneTimeWorkRequest, PeriodicWorkRequest)
- NotificationChannel + NotificationCompat
- Hilt basics (@HiltAndroidApp, @Inject, @Module)
Lectures in this day
- 01
Edit ToDo / Mark as Completed
Tap a row to open the Add screen, but pre-filled with that todo's values. If we're editing (we already have a todo), call `update`. If we're adding new, call `add`. The checkbox on each row flips `done` right away.
Real life · A grocery list on the fridge: tick 'Bread' when you buy it. Change '1 loaf' to '2 loaves' if you change your mind.kotlinbinding.save.setOnClickListener { val t = existing?.copy( 0