File tree 1 file changed +49
-2
lines changed
1 file changed +49
-2
lines changed Original file line number Diff line number Diff line change 1
1
# GankClient-Kotlin
2
2
3
- # 在建中...敬请期待(或许不会弃坑呢?)
4
-
5
3
gank.io kotlin实现的干货集中营客户端
6
4
5
+ 风格采用了Material Design. 多数控件都是design包里面的。
6
+
7
+ ## 项目模式
8
+
7
9
* Kotlin
8
10
* MVP
9
11
* Dagger2
@@ -14,3 +16,48 @@ gank.io kotlin实现的干货集中营客户端
14
16
* DeepLinkDispatch
15
17
* Gson
16
18
* Glide
19
+
20
+
21
+ ### Kotlin
22
+
23
+ 让你的代码量大大减少,函数式编程让你爽到飞上天!如果你想学习Kotlin,本项目应该会给你不少帮助。
24
+
25
+ ## MVP
26
+ 通过契约类Contract管理View Model Presenter接口。
27
+
28
+ * Model -- 主要处理业务,用于数据的获取(如网络、本地缓存)。
29
+ * View -- 用于把数据展示,并且提供交互。
30
+ * Presenter -- View和Model交互的桥梁,二者通过Presenter建立联系。
31
+
32
+
33
+ ## Dagger2
34
+
35
+ 项目中,主要进行presenter、model、retrofit Api等类的注入操作。
36
+
37
+ * ApiComponent 主Component、用于注入AppComponent、便于提供子Component依赖。
38
+ 依赖于:
39
+ 1.ApiModule(提供okhttpClient、Retrofit、Api等)
40
+ 2.AppModule(提供context对象(okhttp拦截器所需))
41
+
42
+ * FuckGoodsComponent ,父Component为ApiComponent 用于注入FuckGoodsPresenter
43
+ 依赖于: FuckGoodsModule(提供FuckGoodsView)
44
+
45
+ * RandomComponent ,父Component为ApiComponent 用于注入RandomPresenter
46
+ 依赖于 : RandomModule(提供RandomView)
47
+
48
+
49
+
50
+ ## Rxjava + Retrofit + okhttp3
51
+ 主要用于网络访问。
52
+
53
+ ## DeepLinkDispatch
54
+ 基于路由进行页面转发。
55
+
56
+ * GankClientUri 定义一些路由规则、URI等
57
+ * GankRouter 统一由此进行路由操作
58
+ ## GSON
59
+ 用于json的解析操作。
60
+
61
+ ## Glide
62
+ 用于图片的加载。
63
+
You can’t perform that action at this time.
0 commit comments