This week’s lecture will teach you how to implement simple MVVM using ViewBinding, ViewModel and LiveData.
This is lecture 8 in a 9 week series on mobile app development with Android and Kotlin. In this Android development course for beginners, you’ll learn the fundamentals of Android development with Kotlin while building a simple weather app using Android Studio.
This week’s lecture covers the following questions:
– How to use ViewBinding to replace findViewById() calls?
– How to implement MVVM using LiveData and the Android Architecture Component ViewModel class?
– How to save ViewModel state across device rotation by using view model scopes?
– How to create a ViewModelProvider.Factory to pass arguments to your scoped ViewModel
— lecture outline —
1:17 – Lecture Starts
13:52 – Code Walkthrough Starts
14:00 – ViewBinding
26:00 – ViewModel + LiveData + MVVM
47:20 – ViewModel scoping & handling configuration change
This Android development course is aimed at beginner programmers who have some familiarity with Java and object oriented programming, but haven’t necessarily built mobile apps before.
Stay Up To Date
This content was originally published here.