The ViewModel class is designed to store and manage UI-related data in a conscious way. The ViewModel is able to live through the configuration changes. It means that even after the Activity is destroyed and recreated after the phone rotation, you’ll still have the same ViewModel with the same data
android view model mvvm viewmodel android-mvvm lifecycles mvvm-architecture mvvm-sample viewmodel-pattern android-viewmodel viewmodel-framework mvvm-viewmodel
-
Updated
Mar 6, 2019 - Kotlin