Android Kotlin: Forecast App 06 – Current Weather View & ViewModel – MVVM Tutorial Course

We have already created a Retrofit service, WeatherNetworkDataSource as an abstraction on top of that service, local database with entities and DAO using the Room library and lastly a repository to rule them all. So, technically speaking, we currently have the model layer done. What’s missing to have a functioning MVVM application is precisely the ViewModel and the View.

In this part we’re going to implement them so that we’ll have the architecture all setup and prepared for adding a nice user interface. You are going to learn how to perform a lazy loading with coroutines in Kotlin, how to connect ViewModel to a repository, how to safely call coroutines from a lifecycle-bound component such as a Fragment and much more!

?Get the code from this tutorial?

 

Leave a comment


This site uses Akismet to reduce spam. Learn how your comment data is processed.


Development made simple

We're here to help you. If you have any questions, let us know.

Copyright 2017 - 2018 Reso Coder © All Rights Reserved