Room + ViewModel + LiveData + RecyclerView (MVVM) Part 1 – WHAT ARE ANDROID ARCHITECTURE COMPONENTS?



In this video series we will build a note taking app, using the Android Architecture Component libraries (Room, ViewModel, LiveData and LifeCycle), a RecyclerView and Java. The data will be stored in an SQLite database and supports insert, read, update and delete operations. For this we will follow the official recommendations from the “Guide to App Architecture” (link below).

In part 1 we will learn what the Architecture Components are, how they work and why we need them. We will learn…

45 Comments

  1. "im not a professional" , but at the same time better than most professionals

  2. Hi, love your tutorials. Could you please make a MVVM app using Volley. I've looked for this everywhere and only found Retrofit. <3 Thank you!

  3. das hier ist verdammt gut. Vielen vielen Dank. Super erklärt, keine überflüssige Information, einfach was man erwartet. Klarttext formuliert. Super dass du es auf Englisch gemacht hast, es nervt total wenn man die ganze Zeit "Ersatzbegriffe" auf Deutsch lernt. So kann man auch einfacher googlen. Geil im wahrsten sinn des Wortes!

  4. Thanks or your great content. It's so well structured, explained and presented. Cheers!

  5. well done bro i appreciate your work and simplisty of providing content….. keep going on

  6. Hey, I was wondering as per LiveData concept, if there is a change in an API Data then automatically all the ones who are observing the Livedata will be notified, so if there is a change in data from server-side would it automatically fetch the Data or we need to fetch the data and then as LiveData would change UI would change?

  7. Truly appreciate your tutorials Flo. Do you have tutorial where you show how to use Room Relation + MVVM?

  8. Plot Twist: 1 Video Dislike = 10% chance of app crash for the Notes App Project.

    Note: I have a Notes App with dark mode (just implemented MaterialComponents plain theme and resulted in an App UI Wide dark mode change) and Same as this but Kotlin and How to implement SearchView to search notes?

  9. I finished learning Kotlin, but when i try to make a note app from your code, the app stops, and the reason is it cannot instiniate the ViewModel, can you help me in order to make the NoteViewModel instiniatable?

  10. I've been developing with java for about 2 – 3 years and I just got into android development. Ive been struggling, but once I find myself coming back to this channel repeatedly. By far the best content on youtube for free! Thanks and keep up the work!

    Also, I think you should check out flutter. In my opinion, I think it is best new language.

  11. the only difference between u and codingwithmitch is the source code. I hope you can provide the source code or give the sample project

  12. Thank you guy. It helps me too much. I was stuck and it droved me crazy. My first dollars I will earn, they will be for you 😉

  13. @Florian : when are we going to get the other libraries of ARCHITECTURE COMPONENTS like – Data Binding, Paging, Navigation, Lifecycle etc. Cant wait to see those 🙂

  14. Excellent series and very detailed and helpful explanations. Very good video editing as well and both video and speech is perfect. Although I'm experienced with old school programming, this is one of the best android programming tutorial I found. Thank you and 5 stars for content and production quality.

  15. I have used all those things on a number of projects. But still had to watch the whole thing because you explain it so well. Your channel is by far one of the best programming related on YouTube. Keep posting!

  16. In the course of evaluating programming tutorials, I am trying to migrate your Room+ViewModel+LiveData+RecyclerView (MVVM) code to androidx using your own migration procedure. My Ubuntu based Android Studio and gradle packages are current. I've cross checked my transcription (1-10) against your published code which does sync and compile without error. Unfortunately it fails to run on the Android emulator. I do observe in MainActivity.java that "ViewModelProviders.of" is crossed out and flagged as deprecated. That could present problems. Logcat cites "android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class android.support.design.widget.CoordinatorLayout". In your discussion you explain that you have opted to use CoordinatorLayout to facilitate floatingactionbutton implementation. You may want to rethink this choice.

  17. if anyone wants the code in kotlin using coroutines with room see this. https://github.com/PembaTamang/MVVM
    Nothing special about it, for coroutines you need to add two more dependencies which you can see in the app level gradle.
    See the repo and dao class for minor changes.

  18. right from the moment i watched the first video from this channel ( notification tutorial )i always know i can count on you thank bro you the best

  19. i have question sir.i'm using java.something is confusing me about mvvm,repository pattern!!! i already know when we are using database in our apps,we should create a "repository" per "entity" and we implement our logic inside repository(netwok calls and database operation),but consider this:i'm developing an "e-commerce app" ,in my "PurchaseActivity" i have some spinners that their data come from server(i must make some network calls to fill spinner with some data from server),and when user click on purchase button,a purchase request will send to server.

    i have some other activities that they have same spinners and same data with some spinner with different data(need different network calls) .so my question is: what can i do? create a repository for each view(activity)(to make my network calls and implement logic)???

  20. What changes would we make to the architecture if the data source is firebase instead of sqlite?

  21. i just wondering if the viewModel also restore the last data state when app terminated and restart? ( i mean also save the data into physical storage ?).

  22. This tutorial series is outstanding. This is going to be my first stop for all things Android.

  23. How is it different from MVC, and why are we missing/ what is replacing the C "Controller" in this example?

Leave a Reply

Your email address will not be published. Required fields are marked *