Skip to content

Commit 2ff0a4b

Browse files
author
zhujiang2
committed
修改 readme
1 parent 3629a92 commit 2ff0a4b

File tree

3 files changed

+46
-28
lines changed

3 files changed

+46
-28
lines changed

README.md

Lines changed: 40 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
11
# Play Android
22

3-
## MVVM?瞎搞一波?
3+
### 体验
44

5-
### 前言
6-
7-
又是好久不见了,真的不是因为我懒,是因为公司目前活确实有点着急,所以每天在忙公司的事情。
8-
9-
在五月下旬的时候写过一篇MVVM的文章:[MVVM?瞎搞一波?](https://juejin.im/post/6844904163969597447)。当时写的时候内心其实很慌,怕写的不好从而误导大家,但写出来之后有几位同行的回答让我对MVVM有了一些更多的理解。
10-
11-
![](https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/5b39d1d28f68403496eb7715005cdbd2~tplv-k3u1fbpfcp-zoom-1.image)
5+
如果看到这里想要下载尝试下的话可以直接点击链接进行下载,或者扫描下面的二维码进行下载。
126

13-
![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/49af99ff2f4f40e09a57a5c1c5bee29d~tplv-k3u1fbpfcp-zoom-1.image)
7+
[https://www.pgyer.com/llj2](https://www.pgyer.com/llj2)
148

15-
例如MVVM的VM就是 ViewModel,但并不只是 JetPack 中的ViewModel那个库,而是泛指视图和数据的绑定等等,于是乎这两天稍微有点时间就赶快趁着晚上和周末的时间继续完善了下之前的MVVM版本的玩安卓,废话不多说,先来看看实现的样子吧。
9+
![img](https://www.pgyer.com/app/qrcode/llj2)
1610

1711
### 玩安卓MVVM版截图
1812

19-
首先来看下之前已经实现的大概样式吧(文末有Github地址)
13+
首先来看下之前已经实现的大概样式吧:
2014

2115
#### 初始样式
2216

@@ -44,14 +38,6 @@
4438
| ------------------------------------------------------------ | ------------------------------------------------------------ |
4539
| ![](https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/69d36313d7f845e4a1704db526d45b35~tplv-k3u1fbpfcp-zoom-1.image) | ![](https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/0f12e1c05adf4bafae9788e8a6543506~tplv-k3u1fbpfcp-zoom-1.image) |
4640

47-
#### 体验
48-
49-
如果看到这里想要下载尝试下的话可以直接点击链接进行下载,或者扫描下面的二维码进行下载。
50-
51-
[https://www.pgyer.com/llj2](https://www.pgyer.com/llj2)
52-
53-
![img](https://www.pgyer.com/app/qrcode/llj2)
54-
5541
### 实现过程
5642

5743
项目用到了很多技术,基本上都是现在安卓app的最新标配,比如:MVVM、JetPack(LiveData、Room、ViewModel)、Retrofit、协程、Glide等等。
@@ -62,8 +48,40 @@
6248

6349
又比如新增的浏览历史功能中用到了**Room**,没有**Room**的时候基本都在使用原生或者使用**LitePal****GreenDAO**等来实现,虽然**LitePal****GreenDAO**也是**ORM**的方式来实现的数据库操作,但是总体来说还是没有**Room**好用,**Room**写好实现的DAO接口文件即可,在你编译的时候会直接生成对应的实现类,真的很香。
6450

65-
类似上面的还有很多,大家可以去Github下载代码来看看,里面代码写的不能说好,但肯定不能说差,如果代码哪块写的不好或者有优化的地方欢迎大家告诉我或者给我提issues。
51+
类似上面的还有很多,如果代码哪块写的不好或者有优化的地方欢迎大家告诉我或者给我提issues。
52+
53+
### 使用到的库
54+
55+
[banner](https://github.com/youth5201314/banner)
56+
57+
[bugly](https://bugly.qq.com/v2/workbench/apps)
58+
59+
[SmartRefreshLayout](https://github.com/scwang90/SmartRefreshLayout)
60+
61+
[utilCode](https://github.com/Blankj/AndroidUtilCode/)
62+
63+
[glide](https://github.com/bumptech/glide)
64+
65+
[retrofit](https://square.github.io/retrofit/)
66+
67+
dataStore
68+
69+
coroutines
70+
71+
room
72+
73+
### License
74+
75+
```xml
76+
Copyright (c) 2020 朱江
6677

67-
好了,大家看看想了解这个app中的哪一块技术,可以写在评论区,下周我再好好写一写关于技术的文章。最后放一下项目的Github地址:[https://github.com/zhujiang521/PlayAndroid](https://github.com/zhujiang521/PlayAndroid)
78+
Permission is hereby granted, free of charge, to any person obtaining a copy
79+
of this software and associated documentation files (the "Software"), to deal
80+
in the Software without restriction, including without limitation the rights
81+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
82+
copies of the Software, and to permit persons to whom the Software is
83+
furnished to do so, subject to the following conditions:
6884

69-
如果对大家有帮助的话别忘了点Star啊,万分感谢🙏
85+
The above copyright notice and this permission notice shall be included in all
86+
copies or substantial portions of the Software.
87+
```

config.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ext {
1111
]
1212

1313
des = [
14-
kotlinVersion: "org.jetbrains.kotlin:kotlin-stdlib:1.4.20",
14+
kotlinVersion: "org.jetbrains.kotlin:kotlin-stdlib:1.4.21",
1515
coreKtx : 'androidx.core:core-ktx:1.3.2',
1616
appcompat : 'androidx.appcompat:appcompat:1.2.0',
1717
junit : 'junit:junit:4.13.1',

floating/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ android {
3434

3535
dependencies {
3636

37-
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
38-
implementation 'androidx.core:core-ktx:1.3.2'
39-
implementation 'androidx.appcompat:appcompat:1.2.0'
37+
implementation des.kotlinVersion
38+
implementation des.coreKtx
39+
implementation des.appcompat
4040
implementation 'com.google.android.material:material:1.2.1'
4141
testImplementation 'junit:junit:4.13.1'
42-
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
43-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
42+
androidTestImplementation des.extJunit
43+
androidTestImplementation des.espressoCore
4444
}

0 commit comments

Comments
 (0)