• MVP模式根模块


    MVP

    根模块,包含一些常用工具类与基类
    GitHub仓库地址

    引入

    gradle

    allprojects {
        repositories {
            maven { url 'https://jitpack.io' }
        }
    }
    
    implementation 'com.github.DL-ZhangTeng:MVP:2.5.0'
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

    部分工具功能(安装配套插件快速创建模板文件BaseLibraryTemplatePlugin-2.5.0.jar)

    MVP工具包(com/zhangteng/mvp)

    工具包名/类名描述
    IModelM层接口
    IViewV层接口
    IPresenterP层接口
    BaseModelM层空实现
    BaseLoadingViewV层带加载中方法的接口
    BaseStateViewV层带网络状态方法的接口,继承自BaseLoadingView
    BaseRefreshViewV层带刷新方法的接口,继承自BaseNoNetworkView
    BasePresenterP层实现,实现了attachView、detachView、onDestroy等方法
    BaseLoadingPresenterP层加载中动画实现,增加了getBaseLoadingView()方法
    BaseHttpEntitymodel到presenter的回调
    LoadingPresenterHandler使用代理的方式自动调用加载动画开启与关闭方法,同步执行方法时才有意义(好像没啥用…)
    BaseMvpFragment使用Mvp模式Fragment基类(可使用插件自动创建Fragment。插件仓库地址
    BaseListMvpFragment使用Mvp模式列表Fragment基类
    BaseMvpActivity使用Mvp模式Activity基类(可使用插件自动创建Activity。插件仓库地址
    BaseListMvpActivity使用Mvp模式列表Activity基类

    混淆

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

    历史版本

    版本更新更新时间
    v2.5.0适配Hilt2023/5/11 at 14:29
    v2.4.0增加ViewBinding实现2023/4/21 at 23:14
    v2.3.0简化view层2023/4/5 at 22:50
    v2.2.0List模板增加VH泛型2022/12/5 at 23:50
    v2.0.1使用BaseLibrary2.0.22022/9/14 at 23:14
    v2.0.0分离出MVP库2022/9/14 at 23:14

    赞赏

    如果您喜欢MVP,或感觉MVP帮助到了您,可以点右上角“Star”支持一下,您的支持就是我的动力,谢谢

    联系我

    邮箱:763263311@qq.com/ztxiaoran@foxmail.com

    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.

  • 相关阅读:
    CPP_D2
    图像的特征类别
    百度地图划区测量获取坐标
    HJ20 密码验证合格程序
    ExpressGridPack 23 Crack
    ASF之InSAR云计算(成果包括DEM、缠绕影像、形变图)
    Hive的相关操作
    一文细谈SNN的基本数学原理,LIF模型,STDP与STBP学习方法
    华为防火墙基础自学系列 | IPsec技术详解
    Jenkins安装配置及插件安装使用
  • 原文地址:https://blog.csdn.net/duoluo9/article/details/126879473