Skip to content

Commit

Permalink
see 12/22 log
Browse files Browse the repository at this point in the history
  • Loading branch information
Blankj committed Dec 22, 2016
1 parent a042045 commit 057a95b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 12 deletions.
12 changes: 11 additions & 1 deletion README-CN.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
## Android开发人员不得不收集的代码([持续更新中][update_log.md])
***

**[README of English][readme.md]**

***

为方便查找,已进行大致归类,其目录如下所示:

> - **Activity相关→[ActivityUtils.java][activity.java][Demo][activity.demo]**
```
isActivityExists : 判断是否存在Activity
Expand Down Expand Up @@ -556,27 +561,31 @@ getEntries : 获取压缩文件中的文件对象
***

### 关于
### About
***

* 做这份整理是想把它作为Android开发的小字典,当遇到一些琐碎问题时,不用再面向百度或者谷歌查询API的使用,费时费力,这里有的话,大家尽管撸走;同时也希望它能逐日壮大起来,期待大家的Star和完善,当然我也会一直更新发布版本和日志,为了方便大家导入,现已上传jcenter;其中很多代码也是汇四方之精华,谢谢前辈们的提供,当然最终还是要通过单元测试的,如有错误,请及时告之。
* QQ群提供讨论,1群:74721490(已满)2群:25206533,至于验证问题对大家来说肯定都是小case。关于群:[在别人生活里低调地做配角(我和466个程序员的故事)][group]
* 我的[微博][weibo],求个关注哈。

### Download
***

Gradle:
``` groovy
compile 'com.blankj:utilcode:1.3.5'
```

### How to use
***

```
Utils.init(context);
```

### Proguard
***

```
-keep class com.blankj.utilcode.** { *; }
-keepclassmembers class com.blankj.utilcode.** { *; }
Expand All @@ -585,6 +594,7 @@ Utils.init(context);

### License
***

```
Copyright 2016 Blankj
Expand Down
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
## Android developers should collect the following utils
***

**[README of Chinese][readme-cn.md]**

***
Directory is shown below:
Directory is shown below:

> - **About Activity→[ActivityUtils.java][activity.java][Demo][activity.demo]**
```
isActivityExists
Expand Down Expand Up @@ -556,25 +560,29 @@ getEntries
***

### About
**I'm so sorry for that the code is annotated with Chinese.**
### About
***

**I'm so sorry for that the code is annotated with Chinese.**

### Download
***

Gradle:
``` groovy
compile 'com.blankj:utilcode:1.3.5'
```

### How to use
***

```
Utils.init(context);
```

### Proguard
***

```
-keep class com.blankj.utilcode.** { *; }
-keepclassmembers class com.blankj.utilcode.** { *; }
Expand All @@ -583,6 +591,7 @@ Utils.init(context);

### License
***

```
Copyright 2016 Blankj
Expand Down
16 changes: 8 additions & 8 deletions utilcode/src/test/java/com/blankj/utilcode/utils/TestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,23 @@ public void readme2Eng() throws Exception {
File readmeCN = new File(new File(System.getProperty("user.dir")).getParent() + SEP + "README-CN.md");
File readmeEng = new File(new File(System.getProperty("user.dir")).getParent() + SEP + "README.md");
List<String> list = FileUtils.readFile2List(readmeCN, "UTF-8");
StringBuilder sb = new StringBuilder("## Android developers should collect the following utils\r\n" +
"**[README of Chinese][readme-cn.md]**\r\n" +
StringBuilder sb = new StringBuilder("## Android developers should collect the following utils\r\n***\r\n\r\n" +
"**[README of Chinese][readme-cn.md]**\r\n\r\n" +
"***\r\n" +
"Directory is shown below\r\n");
List<String> lines = list.subList(4, list.size());
"Directory is shown below:\r\n\r\n");
List<String> lines = list.subList(9, list.size());
for (String line : lines) {
if (line.contains("> -") && line.contains("Utils")) {
String utilsName = line.substring(line.indexOf("[") + 1, line.indexOf("Utils"));
sb.append("> - **About ").append(utilsName).append(line.substring(line.indexOf("→")));
} else if (line.contains(" : ")) {
sb.append(line.substring(0, line.indexOf(
':')).trim());
} else if (line.contains("### 关于")) {
sb.append("### About\n**I'm so sorry for that the code is annotated with Chinese.**");
} else if (line.contains("* 做") || line.contains("* QQ") || line.contains("* 我的")) {
} else if (line.contains("* 做")) {
sb.append("**I'm so sorry for that the code is annotated with Chinese.**");
} else if(line.contains("* QQ") || line.contains("* 我的")){
continue;
} else {
} else{
sb.append(line);
}
sb.append("\r\n");
Expand Down

0 comments on commit 057a95b

Please sign in to comment.