Your next career begins with
Save 50% off your seat in our next iOS Bootcamp. Limited time only. Sessions start April 3.
MVVM on Android
Version history
Android 12, Kotlin 1.6, Android Studio Chipmunk | 2021.2.1 Patch 1
Sep 1 2022Android 4.4+, Kotlin 1.2, Studio 3.1.4 (Selected)
Oct 16 2018In this course, you will learn how to build an Android app using the Model-View-ViewModel presentation architecture pattern, including testing and data binding. By Joe Howard.
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Learning path
This is part of the Android Architecture learning path. View path.
Let's review what you will be learning in this course, including a brief discussion of benefits of MVVM and the course sample project.
In this video, you'll learn about the need for architecture patterns like MVVM and define the layers of an MVVM app.
Create the Model layer for the course sample project, including adding JUnit tests of Model layer classes.
Create a repository interface for saving your Model data, and implement a concrete version of the repository using the Room database library.
Examine the XML layout file and Kotlin class that constitute the View layer of the Add Creature screen.
See how to use the Android Architecture Component ViewModel and LiveData classes to create a ViewModel layer for your app.
Use JUnit to add unit tests for the functionality of the ViewModel layer, while utilizing Mockito to mock dependent classes.
Add the ability for the ViewModel to save Model data into the repository when receiving user events from the View layer.
Prove out your understanding of writing ViewModel tests by adding a test to ensure that a Creature without defined attributes cannot be saved.
Put your new MVVM skills to work by creating a ViewModel for the All Creatures screen that shows a list of all creatures in the repository.
See how to add Data Binding to your Android app and how to bind user actions in the View to methods in the ViewModel.
Learn how to setup two-way data binding between an element in the View layer and a property on the ViewModel.
Review what you learned in the course and learn about other potential architecture patterns for your Android apps.
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development — plans start at just $19.99/month! Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.
Learn more