A small, modern Android todo list app. Add tasks, tick them off, delete them, and clear completed ones. Your list is saved on device and survives restarts.
- ➕ Add tasks with a single tap (or the keyboard's Done key)
- ✅ Mark tasks complete / incomplete — completed items sink to their own section
- 🗑️ Delete individual tasks, or Clear done to remove all completed ones
- 💾 Local persistence with Room — nothing leaves the device
- 🎨 Material 3 UI with dynamic color (Android 12+) and dark‑mode support
| Concern | Choice |
|---|---|
| Language | Kotlin |
| UI | Jetpack Compose + Material 3 |
| Architecture | MVVM (ViewModel + StateFlow) |
| Persistence | Room |
| Async | Kotlin Coroutines / Flow |
| Build | Gradle (Kotlin DSL) + version catalog |
| Min / Target | SDK 24 / 34 |
app/src/main/java/com/example/todoapp/
├── TodoApplication.kt # owns the DB + repository singletons
├── MainActivity.kt # Compose entry point
├── data/
│ ├── Todo.kt # @Entity data model
│ ├── TodoDao.kt # Room DAO (Flow-based queries)
│ ├── TodoDatabase.kt # RoomDatabase
│ └── TodoRepository.kt # thin layer over the DAO
└── ui/
├── TodoViewModel.kt # state + actions
├── TodoScreen.kt # the whole screen in Compose
└── theme/ # Material 3 theme
You need the Android SDK (via Android Studio or the command‑line tools) with
a local.properties pointing at it, or the ANDROID_HOME environment variable set.
# Build a debug APK
./gradlew assembleDebug
# Run the JVM unit tests
./gradlew test
# Install on a connected device / emulator
./gradlew installDebugThe easiest path is to open the project in Android Studio, let it sync, then press Run.