MVVM Todo App for Android using Kotlin.

Overview

MVVM To-Do List App with Flow and Architecture Components

Watch the course here: https://www.youtube.com/playlist?list=PLrnPJCHvNZuCfAe7QK2BoMPkv2TGM_b0E

thumbnail part 1


To-do List with Firebase Real time DB

Watch the coure here: https://www.youtube.com/playlist?list=PLlkSO32XQLGpF9HzRulWLpMbU3mWZYlJS thumbnail firebase


MVVM Hierarchy

MVVM: is a programming paradigm used by many developers. Especially for those who working with MXL. This paradigm support two-way binding for Model & ViewModel

View =

  • Is the front site of the app to show the UI and handle interaction from users. This part is more fascinating & proactive than other ordinary UI layers, because it can do some actions & contact to users through binding, command.

|| || binding data ||

ViewModel =

  • is a replacement for Controller
  • contain code that helps Data Binding, Command
  • is a class to hold the data for the fragment
  • 1VM - many Views (can be 1/2-way binding)

|| || events & observers ||

Model =

  • Is the object layers that help access & operate on real data (from database, data source)

1/ :: ?

  • In kotlin, the double colon operator means to take a method as a parameter and pass it to another method for use. Generally speaking, it refers to a method. => Kiểu kiểu callback nhưng mà là lấy function này nhét vô function kia

2/ DAO ?

  • DAO = Data Access Object: là một interface định nghĩa các phương thức trừu tượng việc triển khai truy cập dữ liệu cơ bản cho BusinessObject để cho phép truy cập vào nguồn dữ liệu (DataSource). *interface: giao diện / khai báo. chỉ là class giữ nhiệm vụ khai báo chứ ko có định nghĩa.

3/ Dagger ? Hilt ?

  • Dagger là 1 dependency injection framework, dùng để generate code thông qua base annotation (chú thích) và để quản lý các dependencies

  • Có thể hiểu Dependency Injection một cách đơn giản như sau: Các module không giao tiếp trực tiếp với nhau, mà thông qua interface. Module cấp thấp sẽ implement interface, module cấp cao sẽ gọi module cấp thấp thông qua interface.

  • Tuy nhiên thì Dagger khá rộng và nặng => Dagger-Hilt là 1 phần của thư viện . Chia thành 4 phần:

    • Module: Provider
    • Provides: Provider
    • Component: Bridge
    • Inject:

4/ Room ? @Entity ? RoomDatabase ?

  • Room Database

  • @Entity: create a SQLite table using data model

  • @Dao: create a Data Access Object in the db using interface class

  • @Database: A class with this annotation will create an abstraction for the DAO

5/ Inject? Singleton?

6/ Coroutines Flow?

7/ Annotation?

  • Chú thích / metadata để cấp thông tin dữ liệu cho mã nguồn

8/ Constructor?

9/ ViewModel() ? @ViewModalInject ?

10/ @AndroidEntryPoint?

11/ @HiltAndroidApp?

12/ Application() from android.app.Application?

13/ RecyclerView? RecyclerViewAdapter? ListAdapter?

14/ binding? inflate?

  • binding: view binding giúp tối giản code, thay thế cho findViewById
  • inflater, inflate: dùng để biến code XML thành View(Java code) trong android

15/ asLiveData()

16/ lambda arguement?

17/ '%' || :searchQuery || '%' in SQLite ?

18/ MutableStateFlow? flatMapLatest?

19/ Combine multiple Flow?

20/ Jetpack Datastore?

21/ IOException?

22/ viewModelScope.launch?

23/ viewLifecycleOwner.lifecycleScope.launch?

24/ init in Kotlin? interface?

25/ position? adapterPosition?

26/ inner class

27/ onClickListener? listener?

28/ ItemTouchHelper?

29/ attachToRecyclerView?

30/ sealed class?

31/ Channel in coroutines?

32/ SavedStateHandle?

33/ @Assisted?

34/ asFlow()?

35/ NavController? NavHostFragment?

36/ setupActionBarWithNavController()? onSupportNavigateUp()?

37/ Activity.ADD_TASK_RESULT_OK?

38/ setFragmentResult() ?

39/ setFragmentResult()?

40/ DialogFragment()?

41/ android vs androidx

42/ expandActionView?

You might also like...
Todo android app
Todo android app

Todo Screenshots Light Mode Dark Mode Used Technology Kotlin Data Binding - Declaratively bind observable data to UI elements. LiveData - Build data o

Yet another ToDo app, but the UI completely written in Jetpack Compose!
Yet another ToDo app, but the UI completely written in Jetpack Compose!

Yet another ToDo app, but the UI completely written in Jetpack Compose!

Simple ToDo app for CodePath
Simple ToDo app for CodePath

Project 1 - Simple ToDo Simple ToDo is an android app that allows building a todo list and basic todo items management functionality including adding

FireDo: A simple todo app
FireDo: A simple todo app

FireDo A simple todo app To do Add Firebase Good UI

A Todo list app with location reminders that remind the user to do something when he reaches a specific location.

A Todo list app with location reminders that remind the user to do something when he reaches a specific location.

A Simple Todo App for Codepath
A Simple Todo App for Codepath

Project 1 - Simple Todo Simple Todo is an android app that allows building a todo list and basic todo items management functionality including adding

Simple ToDo app designed for GDSC [Delhi Technical Campus]
Simple ToDo app designed for GDSC [Delhi Technical Campus]

Simple ToDo Simple ToDp app will help manage your daily tasks and don't forget about important things! ⏰ This app is developed by (Inzemamul Haq) me o

ToDo list is a sample project for save task and complete they. developed with Kotlin , Coroutins and Dagger-Hilt Dependency injection.
ToDo list is a sample project for save task and complete they. developed with Kotlin , Coroutins and Dagger-Hilt Dependency injection.

ToDo list is a sample project for save task and complete they. developed with Kotlin , Coroutins and Dagger-Hilt Dependency injection.

Todo application made with Jetpack Compose
Todo application made with Jetpack Compose

Todo application made with Jetpack Compose. The project allows you to add and manage tasks. Additional functionalities are a 25-minute timer and a view of the statistics of completed tasks.

Owner
Hien Le
Don't stop until you're proud!
Hien Le
Todo-android - To-do App in Andriod that allows building a todo list

To-do App in Andriod todo-android is an android app that allows building a todo

Bernard Mulaw 0 Feb 10, 2022
SimpleToDo is an android app that allows building a todo list and basic todo items management functionality including adding new items, editing and deleting an existing item.

SimpleToDo is an android app that allows building a todo list and basic todo items management functionality including adding new items, editing and deleting an existing item.

null 0 Jan 3, 2022
Android-TODO-LIST-VIPER - Android TODO LIST VIPER

Android TODO List VIPER VIPER is an architectural approach for iOS mobile app de

Allan Nava 1 May 26, 2022
MVVM Todo App for Android using Kotlin.

MVVM To-Do List App with Flow and Architecture Components Watch the course here: https://www.youtube.com/playlist?list=PLrnPJCHvNZuCfAe7QK2BoMPkv2TGM_

Hien Le 1 May 15, 2022
Simple-todo-app - Simple Memo App using SQLite

Judul Aplikasi Aplikasi Memo Sederhana menggunakan SQLite. Fitur Aplikasi Memo y

Ananda Muhamad Lukman 0 Jan 3, 2022
TODO API Client Kata for Kotlin Developers. The main goal is to practice integration testing using MockWebServer

KataTODOApiClient for Kotlin We are here to practice integration testsing using HTTP stubbing. We are going to use MockWebServer to simulate a HTTP se

Karumi 61 Nov 20, 2022
ToDo App is a kind of app that generally used to maintain our day-to-day tasks or list everything that we have to do

ToDo App is a kind of app that generally used to maintain our day-to-day tasks or list everything that we have to do, with the most important tasks at the top of the list, and the least important tasks at the bottom. It is helpful in planning our daily schedules.

Hamza Gamal 9 Oct 16, 2022
Gender Checker app built using Kotlin, MVVM, Genderize.io API. Take this as a reference for MVVM and Genderize.io API 🚀

Gender-Checker ?? Gender Checker app built using Kotlin, MVVM, Genderize.io API Enter a name and the app will guess the gender ?? ✨ Highligts: API : G

Jai Keerthick 0 Jan 5, 2022
An Android Todo List app

Todo List App An android Todo List app I am creating this project to teach myself about SQLDelight, Dependency Injection using Hilt, and Android Archi

Hardik Sachan 3 Oct 16, 2021
An android app that allows building a todo list

Project 1 - SimpleToDo1 SimpleToDo1 is an android app that allows building a todo list and basic todo items management functionality including adding

Ivan Alier-Reyes 0 Nov 9, 2022