MVPArms.md 10.7 KB
Newer Older
J
JessYan 已提交
1
![Logo](image/arms_banner_v1.0.jpg)
J
JessYan 已提交
2 3

<p align="center">
J
JessYan 已提交
4
   <a href="https://bintray.com/jessyancoding/maven/MVPArms/2.4.1/link">
J
JessYan 已提交
5
    <img src="https://img.shields.io/badge/Jcenter-v2.4.1-brightgreen.svg?style=flat-square" alt="Latest Stable Version" />
J
JessYan 已提交
6 7 8 9
  </a>
  <a href="https://travis-ci.org/JessYanCoding/MVPArms">
    <img src="https://travis-ci.org/JessYanCoding/MVPArms.svg?branch=master" alt="Build Status" />
  </a>
J
jessyan 已提交
10 11
  <a href="https://developer.android.com/about/versions/android-4.0.html">
    <img src="https://img.shields.io/badge/API-14%2B-blue.svg?style=flat-square" alt="Min Sdk Version" />
J
JessYan 已提交
12 13 14 15
  </a>
  <a href="http://www.apache.org/licenses/LICENSE-2.0">
    <img src="http://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square" alt="License" />
  </a>
J
JessYan 已提交
16 17 18
  <a href="https://www.jianshu.com/u/1d0c0bc634db">
    <img src="https://img.shields.io/badge/Author-JessYan-orange.svg?style=flat-square" alt="Author" />
  </a>
J
JessYan 已提交
19
  <a href="https://shang.qq.com/wpa/qunwpa?idkey=1a5dc5e9b2e40a780522f46877ba243eeb64405d42398643d544d3eec6624917">
J
JessYan 已提交
20
    <img src="https://img.shields.io/badge/QQ群-301733278-orange.svg?style=flat-square" alt="QQ Group" />
J
JessYan 已提交
21 22
  </a>
</p>
J
jessyan 已提交
23

J
JessYan 已提交
24
<h2 align="center">一个整合了大量主流开源项目高度可配置化的 Android MVP 快速集成框架</h2>
J
jessyan 已提交
25

J
JessYan 已提交
26
## Usage
J
JessYan 已提交
27
> New Project (**以下步骤太麻烦? 现在可直接在新建的新工程中使用新功能 [一键生成 app Module](https://github.com/JessYanCoding/MVPArms-Module-Template), 让您免于项目繁琐的配置, 快速开启 MVPArms 的世界**)
J
JessYan 已提交
28
>> 如果您想构建一个全新的项目, 直接将整个项目 **clone** (或者下载) 下来, 再将 **demo** 作为主 **Module** (建议将 **arms Module** 删除, 并使用 **Gradle** [远程依赖](https://github.com/JessYanCoding/MVPArms/wiki#1.1) 本框架, 便于更新, 删除前请务必先查看 [这里](https://github.com/JessYanCoding/MVPArms/wiki/Issues#2)), 最后将项目包名改成自己的包名, **demo Module** 包含可以直接使用的包结构, 一个主流的 `MVP`+`Dagger2`+`Retrofit`+`RxJava` 框架就这样轻松的构建成功了, 现在您再参考 **Mvp** 包下的 **UserActivity** 的格式, [使用 Template 一键生成 MVP , Dagger2 相关的所有类](https://github.com/JessYanCoding/MVPArmsTemplate), 配合查阅 [Wiki 文档](https://github.com/JessYanCoding/MVPArms/wiki) 慢慢掌握本框架, 看再多文章不如早点在项目中使用它, 在实践中学习总是最快的
J
jessyan 已提交
29 30
 
> Old Project
J
JessYan 已提交
31
>> [老项目想引入此框架,可以参考 Wiki 文档,写的非常详细](https://github.com/JessYanCoding/MVPArms/wiki)
J
jessyan 已提交
32

J
jessyan 已提交
33
## Wiki
J
JessYan 已提交
34
[详细使用方法及扩展功能,请参照 Wiki (**开发前必看!!!**)](https://github.com/JessYanCoding/MVPArms/wiki)
J
jessyan 已提交
35

J
jessyan 已提交
36
## Notice
J
jessyan 已提交
37

J
JessYan 已提交
38
* [**MVPArms 官方组件化方案 ArmsComponent**](https://github.com/JessYanCoding/ArmsComponent/wiki)
J
JessYan 已提交
39

J
JessYan 已提交
40 41
* [MVPArms 学习项目](https://github.com/JessYanCoding/MVPArms/blob/master/CONTRIBUTING_APP.md)

J
jessyan 已提交
42 43
* [意见收集](https://github.com/JessYanCoding/MVPArms/issues/40)

J
jessyan 已提交
44 45
* [更新日志](https://github.com/JessYanCoding/MVPArms/wiki/UpdateLog)

J
JessYan 已提交
46
* [常见 Issues](https://github.com/JessYanCoding/MVPArms/wiki/Issues)
J
jessyan 已提交
47

J
JessYan 已提交
48
* [我们为什么要把 Dagger2,MVP 以及 RxJava 引入项目中?](http://www.jianshu.com/p/91c2bb8e6369)
J
jessyan 已提交
49

J
JessYan 已提交
50
* 看了上面的文章,对为什么使用这些技术应该比较了解了,使用这些技术对项目后期的维护和迭代特别是大型项目非常有帮助,但是在开发前期每写一个页面要多写很多  `MVP``Dagger2` 的类和接口,这对于开发前期确实比较头疼,现在本框架已经可以通过 [Template](https://github.com/JessYanCoding/MVPArmsTemplate) 自动生成一些 `MVP``Dagger2` 的模版代码,现在大家可以非常轻松的使用本框架.
J
jessyan 已提交
51

J
JessYan 已提交
52
* 使用此框架自带自动适配功能 (可不使用),请参考 [AutoLayout 使用方法](https://github.com/hongyangAndroid/AndroidAutoLayout).
J
jessyan 已提交
53

J
JessYan 已提交
54
* 作为通用框架,本框架不提供与 **UI** 有关的任何第三方库.
J
jessyan 已提交
55

J
jessyan 已提交
56
## Functionality & Libraries
J
JessYan 已提交
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
1. [`Mvp` 是 Google 官方出品的 `Mvp` 架构项目,含有多个不同的架构分支(此为 Dagger 分支).](https://github.com/googlesamples/android-architecture/tree/todo-mvp-dagger/)
2. [`Dagger2` 是 Google 根据 Square 的 Dagger1 出品的依赖注入框架,通过 Apt 编译时生成代码,性能优于使用运行时反射技术的依赖注入框架.](https://github.com/google/dagger)
3. [`RxJava` 提供优雅的响应式 Api 解决异步请求以及事件处理.](https://github.com/ReactiveX/RxJava)
4. [`RxAndroid` 为 Android 提供响应式 Api.](https://github.com/ReactiveX/RxAndroid)
5. [`Rxlifecycle`,在 Android 上使用 rxjava 都知道的一个坑,就是生命周期的解除订阅,这个框架通过绑定 Activity 和 Fragment 的生命周期完美解决该问题.](https://github.com/trello/RxLifecycle)
6. [`RxCache` 是使用注解,为 Retrofit 加入二级缓存 (内存,磁盘) 的缓存库.](https://github.com/VictorAlbertos/RxCache)
7. [`RxErroHandler` 是 `RxJava` 的错误处理库,可在出现错误后重试.](https://github.com/JessYanCoding/RxErrorHandler)
8. [`RxPermissions` 用于处理 Android 运行时权限的响应式库.](https://github.com/tbruyelle/RxPermissions)
9. [`Retrofit` 是 Square 出品的网络请求库,极大的减少了 http 请求的代码和步骤.](https://github.com/square/retrofit)
10. [`Okhttp` 同样Square出品,不多介绍,做Android都应该知道.](https://github.com/square/okhttp)
11. [`AutoSize` 是今日头条屏幕适配方案终极版,一个极低成本的 Android 屏幕适配方案](https://github.com/JessYanCoding/AndroidAutoSize)
12. [`Gson` 是 Google 官方的 Json Convert 框架.](https://github.com/google/gson)
13. [`Butterknife` 是 JakeWharton 大神出品的 View 注入框架.](https://github.com/JakeWharton/butterknife)
14. [`Androideventbus` 是一个轻量级使用注解的 Eventbus.](https://github.com/hehonghui/AndroidEventBus)
15. [`Timber` 是 JakeWharton 大神出品 Log 框架容器,内部代码极少,但是思想非常不错.](https://github.com/JakeWharton/timber)
16. [`Glide` 是本框架默认封装图片加载库,可参照着例子更改为其他的库,Api 和 `Picasso` 差不多,缓存机制比 `Picasso` 复杂,速度快,适合处理大型图片流,支持 gif 图片,`Fresco` 太大了!在 5.0 以下优势很大,5.0 以上系统默认使用的内存管理和 `Fresco` 类似.](https://github.com/bumptech/glide)
17. [`LeakCanary` 是 Square 出品的专门用来检测 `Android` 和 `Java` 的内存泄漏,通过通知栏提示内存泄漏信息.](https://github.com/square/leakcanary)
J
JessYan 已提交
74

J
JessYan 已提交
75 76
## Who is using MVPArms?

J
JessYan 已提交
77
**MVPArms** 从诞生之初, 一直真诚的为开发者做着力所能及的事, 从详细的 [**Wiki**文档](https://github.com/JessYanCoding/MVPArmsTemplate) 到高效的 [代码生成器](https://github.com/JessYanCoding/MVPArms/wiki), 无一不透露着 **MVPArms** 对开发者诚挚的付出和关怀  
J
JessYan 已提交
78

J
JessYan 已提交
79
**MVPArms** 经过近两年时间殷勤的耕耘, 逐渐变得成熟, 稳定, 这不得不归功于 **MVPArms** 大家庭中每一位成员一直以来真诚的反馈和建议, 在此由衷的感谢他们为 **MVPArms** 做出的不可磨灭的贡献  
J
JessYan 已提交
80

J
JessYan 已提交
81
但是 **MVPArms** 远不止于此, 还有更多的路要走, 还会继续成长, 变得更加强大, 现在我们诚挚的邀请您也成为咱们 **MVPArms** 大家庭中的一员  
J
JessYan 已提交
82 83 84 85 86 87

**小顶家装 工长端** | **小顶家装 工人端** | **小顶家装 材料端** | **小顶网** | **智播** |
:-------------------------------------------------------------------:|:----------:|:---------------:|:--------:|:--------------:|
[<img src="image/xiaoding_foreman_logo.png" width="80" height="80">](http://www.dggxdjz.com) | [<img src="image/xiaoding_worker_logo.png" width="80" height="80">](http://www.dggxdjz.com) | [<img src="image/xiaoding_material_logo.png" width="80" height="80">](http://www.dggxdjz.com) | [<img src="image/top_net_work_logo.png" width="80" height="80">](http://www.dgg.net/appload.htm) | [<img src="image/zhibo_logo.png" width="80" height="80">](http://www.zhibocloud.cn/)| 
**天天视频** | **天天直播** | **中斗通航** | **中斗祥云** | **麋鹿旅行** |
[<img src="image/tiantian_video_logo.png" width="80" height="80">](http://sj.qq.com/myapp/detail.htm?apkName=com.dzwh.ttys) | [<img src="image/tiantian_live_logo.png" width="80" height="80">](http://www.25pp.com/android/detail_7611392/) | [<img src="image/tong_hang_logo.png" width="80" height="80">](https://fir.im/3176) | <img src="image/xiang_yun_logo.png" width="80" height="80">  | [<img src="image/mi_lu_logo.png" width="80" height="80">](http://android.myapp.com/myapp/detail.htm?apkName=com.elk.tourist) | 
J
jessyan 已提交
88 89
**汇财富** | **觅窝** | **晒墨宝** | **(In Progress App ...)** | **(Your App ...)** |
[<img src="image/hui_cai_fu_logo.png" width="80" height="80">](http://android.myapp.com/myapp/detail.htm?apkName=com.tahone.client) | [<img src="image/mi_wo_logo.png" width="80" height="80">](http://miwo.ai/) | [<img src="image/shaimobao_logo.png" width="80" height="80">](http://sj.qq.com/myapp/search.htm?kw=%E6%99%92%E5%A2%A8%E5%AE%9D)  | <img src="image/android_logo.png" width="80" height="80"> | <img src="image/android_logo.png" width="80" height="80">|  
J
jessyan 已提交
90
 
J
jessyan 已提交
91

J
jessyan 已提交
92
## Acknowledgements 
J
JessYan 已提交
93
感谢本框架所使用到的所有三方库的 **Author** ,以及所有为 **Open Sourece** 做无私贡献的 **Developer****Organizations** ,使我们能更好的工作和学习,本人也会将业余时间回报给开源社区
J
jessyan 已提交
94

J
jessyan 已提交
95 96
## Donate
如果您认可 **MVPArms** 的代码质量,并使用 **MVPArms** 在实际开发中切实的提升了您的工作效率和开发能力,请您点击右上角 **Star** 支持一下谢谢!
J
jessyan 已提交
97

J
JessYan 已提交
98
**MVPArms** 为作者使用业余时间维护,如果您觉得我的付出给您带来了实质的帮助,您也可以扫描下面的二维码,请作者喝一杯咖啡 ☕️~~
J
jessyan 已提交
99

J
jessyan 已提交
100
![alipay](image/pay_alipay.jpg) ![](image/pay_wxpay.jpg)
J
jessyan 已提交
101

J
jessyan 已提交
102
## About Me
J
jessyan 已提交
103 104 105 106
* **Email**: <jess.yan.effort@gmail.com>  
* **Home**: <http://jessyan.me>
* **掘金**: <https://gold.xitu.io/user/57a9dbd9165abd0061714613>
* **简书**: <http://www.jianshu.com/u/1d0c0bc634db>
J
jessyan 已提交
107

J
jessyan 已提交
108
## License
J
jessyan 已提交
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
``` 
 Copyright 2016, jessyan       
  
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at 
 
       http://www.apache.org/licenses/LICENSE-2.0 

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
```