Skip to content

Commit

Permalink
1.增加Readme
Browse files Browse the repository at this point in the history
2.增加change log
  • Loading branch information
firelion0725 committed Jul 3, 2018
1 parent 302c188 commit ca367bf
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# CHANGE LOG

## Version 1.0.0
第一个稳定发布版
## Version 1.1.0
1.修正toast不会新创建的bug
2.修正注释
3.增加KeyboardUtils工具
4.根据阿里规范及标准重新修订ThreadUtils线程池工具
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
`
# app gradle
` dependencies {
implementation 'com.github.firelion0725:MyUtils:v1.0.0'
implementation 'com.github.firelion0725:MyUtils:v1.1.0'
}
`

Expand Down Expand Up @@ -79,3 +79,9 @@
## TimeUtils 时间工具类
*  millis2String:将时间戳转为时间字符串
*  isSameDay:是否为同一天
## ThreadUtils 线程池工具类
*  createThreadPool:自定义创建线程池
*  doSomeBackgroundWork:标准Android线程处理runnable
*  doSomeLightWeightBackgroundWork:轻量级处理runnable
*  doSomeMainThreadWork:主线程处理runnable
*  doSomeTaskAtHighPriority:带权重的轻量级处理runnable
8 changes: 6 additions & 2 deletions app/src/main/java/com/leo/test/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ protected void onCreate(Bundle savedInstanceState) {
);

tv.setText(stringFromJNI());
testThreadPool();
}

/**
Expand Down Expand Up @@ -80,9 +81,12 @@ private void test() {
}

private void testThreadPool() {
// for (int i = 0; i < 1000; i++) {
// ExecutorService executor = ThreadUtils.createDefaultThreadPool();
// executor.execute(new InnerRunnable(i));
// }
for (int i = 0; i < 1000; i++) {
ExecutorService executor = ThreadUtils.createDefaultThreadPool();
executor.execute(new InnerRunnable(i));
ThreadUtils.doSomeLightWeightBackgroundWork(new InnerRunnable(i));
}
}

Expand Down

0 comments on commit ca367bf

Please sign in to comment.