MVVM on Android, Episode 6: Build the ViewModel | Kodeco

See how to use the Android Architecture Component ViewModel and LiveData classes to create a ViewModel layer for your app.


This is a companion discussion topic for the original entry at https://www.kodeco.com/34930785-mvvm-on-android/lessons/6
1 Like

At the timestamp 4:40 while in the CreatureActivity.kt file,
the function ViewModelProviders has been replaced with
ViewModelProvider

the new line should look like
viewModel = ViewModelProvider(this).get(CreatureViewModel::class.java)

You can also open the final version of the building the view model test file

3 Likes

Thanks for pointing it out.
The student materials have these changes already and that was mentioned in introductory episode.
Thanks once again :]

1 Like