1. Introduction to the MVP
There are more than the introduction of the Internet, here said at the beginning of the time did not understand the meaning of the figure (online search)
2. In fact, in the code, the expression is that in presenter this implementation class will have a iview interface object and a Imodel interface object, through the two interface objects to invoke the method, so that the separation between the view and model is realized, They're working with each other through this presenter object.
In this presenter, a method is called, the data obtained from the Imodel object gets data and the view method that needs the data in iview is passed, and the following code calls the Imodel object's method of loading data in presenter. When the load succeeds, the loaded data is passed to the IView object, and the IView object calls the method that receives the data (usually the IView object is the activity or fragment view) and assigns the received data to the child controls that it corresponds to.
The following is the code that assigns a value to a child view in the IView class
Here's how to load data in a Imodel implementation class
3. The order in which data is transmitted above is
Android MVP mode first known-1