MVP pattern root module

MVP

Root module, including some common tool classes and base class
GitHub warehouse addresses

introduce

gradle

allprojects {
    
    
    repositories {
    
    
        maven {
    
     url 'https://jitpack.io' }
    }
}

implementation 'com.github.DL-ZhangTeng:MVP:2.5.0'

Some tool functions (install the supporting plug-in to quickly create template files BaseLibraryTemplatePlugin-2.5.0.jar)

MVP toolkit (com/zhangteng/mvp)

Tool package name/class name describe
Model M layer interface
View V layer interface
IPresenter P layer interface
BaseModel M layer empty implementation
BaseLoadingView V layer interface with loading method
BaseStateView V layer interface with network status method, inherited from BaseLoadingView
BaseRefreshView V layer interface with refresh method, inherited from BaseNoNetworkView
BasePresenter P layer implementation, implementing attachView, detachView, onDestroy and other methods
BaseLoadingPresenter Animation implementation during P layer loading, added getBaseLoadingView() method
BaseHttpEntity Callback from model to presenter
LoadingPresenterHandler Use a proxy to automatically call the loading animation opening and closing methods. It only makes sense to execute the method synchronously (it seems useless...)
They are in MvpFragment Use the Mvp mode Fragment base class (you can use plug-ins to automatically create Fragments. Plug-in warehouse address )
BaseListMvpFragment Using the Mvp pattern list Fragment base class
BaseMvpActivity Use Mvp mode Activity base class (Activity can be automatically created using plug-ins. Plug-in warehouse address )
BaseListMvpActivity Using the Mvp pattern list Activity base class

Confuse

-keep public class com.zhangteng.**.*{ *; }

historic version

Version renew Update time
v2.5.0 Adapt to Hilt 2023/5/11 at 14:29
v2.4.0 Add ViewBinding implementation 2023/4/21 at 23:14
v2.3.0 Simplify the view layer 2023/4/5 at 22:50
v2.2.0 List template adds VH generics 2022/12/5 at 23:50
v2.0.1 Using BaseLibrary2.0.2 2022/9/14 at 23:14
v2.0.0 Separate the MVP library 2022/9/14 at 23:14

Appreciate

If you like MVP, or feel that MVP has helped you, you can click "Star" in the upper right corner to support it. Your support is my motivation, thank you.

contact me

Email: [email protected]/[email protected]

License

Copyright © [2020] [Swing]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Guess you like

Origin blog.csdn.net/duoluo9/article/details/126879473
MVP