Understanding of android Jetpack MVVM

In the android architecture, the understanding of MVVM:

1. MVVM includes model, view, and view model. The model refers to the data layer. The data can be local data or remote server data. The view refers to Activity, Fragment, XML, and the view model is composed of Jetpack's Binding and LiveData;

2. The view has a view model instance and binds LiveData data to the control;

3. The view model has a data instance, and converts the data into LiveData format and transfers the LiveData data to the data instance;


The architecture of Android MVVM:
insert image description here

Guess you like

Origin blog.csdn.net/KPer_Yang/article/details/130375487