├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── styles.xml │ │ │ │ └── strings.xml │ │ │ ├── drawable │ │ │ │ ├── wow_such_empty.jpg │ │ │ │ ├── ic_add.xml │ │ │ │ ├── ic_delete.xml │ │ │ │ └── ic_launcher_background.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── menu │ │ │ │ └── menu_main.xml │ │ │ ├── layout │ │ │ │ ├── activity_to_do_list.xml │ │ │ │ ├── content_to_do_list.xml │ │ │ │ ├── activity_add.xml │ │ │ │ └── todo_item.xml │ │ │ └── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── project │ │ │ │ └── segunfrancis │ │ │ │ └── yetanothertodoapp │ │ │ │ ├── ToDoApplication.kt │ │ │ │ ├── data │ │ │ │ ├── ToDoRoomDatabase.kt │ │ │ │ ├── ToDoRepository.kt │ │ │ │ ├── ToDoDao.kt │ │ │ │ ├── ToDoRepositoryImpl.kt │ │ │ │ └── ToDo.kt │ │ │ │ ├── ui │ │ │ │ ├── list │ │ │ │ │ ├── OnItemClickListener.kt │ │ │ │ │ ├── ListUtils.kt │ │ │ │ │ ├── ToDoListViewModel.kt │ │ │ │ │ ├── ToDoListActivity.kt │ │ │ │ │ └── ToDoAdapter.kt │ │ │ │ └── add │ │ │ │ │ ├── AddViewModel.kt │ │ │ │ │ └── AddActivity.kt │ │ │ │ ├── ExtensionUtil.kt │ │ │ │ └── di │ │ │ │ ├── RepoModule.kt │ │ │ │ └── DatabaseModule.kt │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── project │ │ │ └── segunfrancis │ │ │ └── yetanothertodoapp │ │ │ ├── TestExt.kt │ │ │ ├── MainCoroutineRule.kt │ │ │ ├── ListUtilsTest.kt │ │ │ ├── AddViewModelTest.kt │ │ │ └── ListViewModelTest.kt │ └── androidTest │ │ └── java │ │ └── com │ │ └── project │ │ └── segunfrancis │ │ └── yetanothertodoapp │ │ ├── AddActivityTest.kt │ │ ├── ToDoListActivityTest.kt │ │ └── ToDoDaoTest.kt ├── proguard-rules.pro └── build.gradle ├── .idea ├── .name ├── codeStyles │ ├── codeStyleConfig.xml │ └── Project.xml ├── dictionaries │ └── SegunFrancis.xml ├── vcs.xml ├── kotlinc.xml ├── misc.xml ├── runConfigurations.xml ├── gradle.xml └── jarRepositories.xml ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── screenshots ├── Screenshot_20200811-190551_Yet Another Todo App.jpg ├── Screenshot_20200811-190610_Yet Another Todo App.jpg ├── Screenshot_20200811-190626_Yet Another Todo App.jpg └── Screenshot_20200813-192229_Yet Another Todo App.jpg ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── README.md └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | Yet Another Todo App -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | rootProject.name = "Yet Another Todo App" -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16dp 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segunfrancis/Yet-Another-Todo-App/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable/wow_such_empty.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segunfrancis/Yet-Another-Todo-App/HEAD/app/src/main/res/drawable/wow_such_empty.jpg -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segunfrancis/Yet-Another-Todo-App/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segunfrancis/Yet-Another-Todo-App/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segunfrancis/Yet-Another-Todo-App/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segunfrancis/Yet-Another-Todo-App/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segunfrancis/Yet-Another-Todo-App/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segunfrancis/Yet-Another-Todo-App/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segunfrancis/Yet-Another-Todo-App/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segunfrancis/Yet-Another-Todo-App/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segunfrancis/Yet-Another-Todo-App/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segunfrancis/Yet-Another-Todo-App/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /screenshots/Screenshot_20200811-190551_Yet Another Todo App.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segunfrancis/Yet-Another-Todo-App/HEAD/screenshots/Screenshot_20200811-190551_Yet Another Todo App.jpg -------------------------------------------------------------------------------- /screenshots/Screenshot_20200811-190610_Yet Another Todo App.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segunfrancis/Yet-Another-Todo-App/HEAD/screenshots/Screenshot_20200811-190610_Yet Another Todo App.jpg -------------------------------------------------------------------------------- /screenshots/Screenshot_20200811-190626_Yet Another Todo App.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segunfrancis/Yet-Another-Todo-App/HEAD/screenshots/Screenshot_20200811-190626_Yet Another Todo App.jpg -------------------------------------------------------------------------------- /screenshots/Screenshot_20200813-192229_Yet Another Todo App.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/segunfrancis/Yet-Another-Todo-App/HEAD/screenshots/Screenshot_20200813-192229_Yet Another Todo App.jpg -------------------------------------------------------------------------------- /.idea/dictionaries/SegunFrancis.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | segun 5 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/kotlinc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 05 09:37:13 WAT 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/java/com/project/segunfrancis/yetanothertodoapp/ToDoApplication.kt: -------------------------------------------------------------------------------- 1 | package com.project.segunfrancis.yetanothertodoapp 2 | 3 | import android.app.Application 4 | import dagger.hilt.android.HiltAndroidApp 5 | 6 | /** 7 | * Created by SegunFrancis 8 | */ 9 | 10 | @HiltAndroidApp 11 | class ToDoApplication : Application() -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_add.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /app/src/main/java/com/project/segunfrancis/yetanothertodoapp/data/ToDoRoomDatabase.kt: -------------------------------------------------------------------------------- 1 | package com.project.segunfrancis.yetanothertodoapp.data 2 | 3 | import androidx.room.Database 4 | import androidx.room.RoomDatabase 5 | 6 | /** 7 | * Created by SegunFrancis 8 | */ 9 | 10 | @Database(entities = [ToDo::class], version = 1, exportSchema = false) 11 | abstract class ToDoRoomDatabase : RoomDatabase() { 12 | abstract fun todoDao(): ToDoDao 13 | } -------------------------------------------------------------------------------- /app/src/main/java/com/project/segunfrancis/yetanothertodoapp/ui/list/OnItemClickListener.kt: -------------------------------------------------------------------------------- 1 | package com.project.segunfrancis.yetanothertodoapp.ui.list 2 | 3 | import com.project.segunfrancis.yetanothertodoapp.data.ToDo 4 | 5 | /** 6 | * Created by SegunFrancis 7 | * 8 | * Interface to handle adapter item clicks 9 | */ 10 | 11 | interface OnItemClickListener { 12 | fun onCheckboxChecked(id: String) 13 | fun onDeleteIconClicked(toDo: ToDo) 14 | } -------------------------------------------------------------------------------- /app/src/test/java/com/project/segunfrancis/yetanothertodoapp/TestExt.kt: -------------------------------------------------------------------------------- 1 | package com.project.segunfrancis.yetanothertodoapp 2 | 3 | import kotlinx.coroutines.ExperimentalCoroutinesApi 4 | import kotlinx.coroutines.test.runBlockingTest 5 | 6 | /** 7 | * Created by SegunFrancis 8 | */ 9 | 10 | @ExperimentalCoroutinesApi 11 | fun MainCoroutineRule.runBlockingTest(block: suspend () -> Unit) = 12 | this.testDispatcher.runBlockingTest { 13 | block() 14 | } -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/project/segunfrancis/yetanothertodoapp/data/ToDoRepository.kt: -------------------------------------------------------------------------------- 1 | package com.project.segunfrancis.yetanothertodoapp.data 2 | 3 | import kotlinx.coroutines.flow.Flow 4 | 5 | /** 6 | * Created by SegunFrancis 7 | */ 8 | 9 | interface ToDoRepository { 10 | 11 | fun getAllToDos(): Flow> 12 | 13 | suspend fun insert(toDo: ToDo) 14 | 15 | suspend fun toggleTodo(id: String) 16 | 17 | fun getUpcomingToDosCount(): Flow 18 | 19 | suspend fun delete(toDo: ToDo) 20 | } -------------------------------------------------------------------------------- /app/src/main/java/com/project/segunfrancis/yetanothertodoapp/ExtensionUtil.kt: -------------------------------------------------------------------------------- 1 | package com.project.segunfrancis.yetanothertodoapp 2 | 3 | import android.view.View 4 | import androidx.lifecycle.LiveData 5 | import androidx.lifecycle.MutableLiveData 6 | 7 | /** 8 | * Created by SegunFrancis 9 | */ 10 | 11 | fun View.show() { 12 | visibility = View.VISIBLE 13 | } 14 | 15 | fun View.hide() { 16 | visibility = View.INVISIBLE 17 | } 18 | 19 | fun MutableLiveData.asLiveData(): LiveData { 20 | return this 21 | } -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #003CEF 4 | #00279A 5 | #03DAC5 6 | #fff3e0 7 | #ffb74d 8 | #fb8c00 9 | #ef6c00 10 | #e65100 11 | #64b5f6 12 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_delete.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/java/com/project/segunfrancis/yetanothertodoapp/di/RepoModule.kt: -------------------------------------------------------------------------------- 1 | package com.project.segunfrancis.yetanothertodoapp.di 2 | 3 | import com.project.segunfrancis.yetanothertodoapp.data.ToDoRepository 4 | import com.project.segunfrancis.yetanothertodoapp.data.ToDoRepositoryImpl 5 | import dagger.Binds 6 | import dagger.Module 7 | import dagger.hilt.InstallIn 8 | import dagger.hilt.android.components.ActivityRetainedComponent 9 | 10 | /** 11 | * Created by SegunFrancis 12 | */ 13 | 14 | @Module 15 | @InstallIn(ActivityRetainedComponent::class) 16 | abstract class RepoModule { 17 | 18 | @Binds 19 | abstract fun bindRepository(repositoryImpl: ToDoRepositoryImpl): ToDoRepository 20 | } -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 14 | 15 |