Kotlin-mvpro

Project Url: vihuela/Kotlin-mvpro
Introduction: Kotlin databinding mvp rx
More: Author   ReportBugs   
Tags:



介绍

Apache 2.0 License

这个项目是基于Kotlin下的 MVP 实践,使用 DataBinding、RxJava、Rxkoltin

项目结构

  • 符合MVP 架构,Presenter 使用 Fragment,分发生命周期、与RxLifecycle协作方便
  • 项目涵盖大部分 kotlin 操作,使用新特性封装 eventBus、xml 文件一句话添加 loadingView、全局网络监测、仅网络异常重连逻辑(可配置次数与间隔)、stateView、简化类继承链
  • 各模块解耦使用泛型创建,基类结构清晰,如 Fragment 的继承链,懒加载->数据绑定->业务基类
  • 网络使用 Retrofit2、RxJava2,缓存使用RxCache,网络监测使用ReactiveNetwork,页面路由使用ActivityRouter
  • 所有场景的操作均与 Rxlifecycle 绑定,跟随 View 的生命周期
  • 过滤网络业务异常、责任链过滤网络逻辑异常

image

使用

    compile 'com.ricky:mvpro-kotlin:1.3.5'

    或者 外部引用了 rxlifecycle2
    compile('com.ricky:mvpro-kotlin:1.3.5', { exclude group: 'com.trello.rxlifecycle2' })

apk

点击下载

注意事项

  • java 下此项目的版本可以参考:RAD,Presenter 带数据缓存,欢迎一起讨论
  • 任何与项目有关或者有关 kotlin 学习可以通过 issue 交流,定知无不言
  • 感谢Kotlin-Android-Template
Apps
About Me
GitHub: Trinea
Facebook: Dev Tools