I have used in EmployeeMvvmActivity.java., CompaniesMvvmActivity / Fragment.
The Model-View-ViewModel Pattern
The main players in the MVVM pattern are:
The View — that informs the ViewModel about the user’s actions
The ViewModel — exposes streams of data relevant to the View
The DataModel — abstracts the data source. The ViewModel works with the DataModel to get and save the data.
I have used in EmployeeMvvmActivity.java., CompaniesMvvmActivity / Fragment.
The Model-View-ViewModel Pattern The main players in the MVVM pattern are:
The View — that informs the ViewModel about the user’s actions The ViewModel — exposes streams of data relevant to the View The DataModel — abstracts the data source. The ViewModel works with the DataModel to get and save the data.
by https://medium.com/upday-devs/android-architecture-patterns-part-3-model-view-viewmodel-e7eeee76b73b https://github.com/florina-muntenescu/DroidconMVVM