Skip to content

Commit cc8ede8

Browse files
committed
see 01/31 log
1 parent 9710722 commit cc8ede8

File tree

8 files changed

+28
-12
lines changed

8 files changed

+28
-12
lines changed

README-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
[logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png
4343

44-
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.12.4-brightgreen.svg
44+
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.12.5-brightgreen.svg
4545
[auc]: https://github.com/Blankj/AndroidUtilCode
4646

4747
[apisvg]: https://img.shields.io/badge/API-14+-brightgreen.svg

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ If this ptoject helps you a lot, and you would like to support this ptoject's fu
4141

4242
[logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png
4343

44-
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.12.4-brightgreen.svg
44+
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.12.5-brightgreen.svg
4545
[auc]: https://github.com/Blankj/AndroidUtilCode
4646

4747
[apisvg]: https://img.shields.io/badge/API-14+-brightgreen.svg

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ dependencies {
6767
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakcanary_version"
6868
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakcanary_version"
6969

70-
// implementation 'com.blankj:utilcode:1.12.4'
70+
// implementation 'com.blankj:utilcode:1.12.5'
7171
}
7272

7373

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ ext {
3232
min_sdk_version = 14
3333
target_sdk_version = 23
3434

35-
version_code = 1_012_004
36-
version_name = '1.12.4'// E.g 1.9.72 => 1,009,072
35+
version_code = 1_012_005
36+
version_name = '1.12.5'// E.g 1.9.72 => 1,009,072
3737

3838
// App dependencies
3939
support_version = '26.1.0'

update_log.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
* 18/01/31 修复 default 相关的逻辑错误,发布 1.12.4
1+
* 18/01/31 修复 default 相关的逻辑错误,发布 1.12.4,修复 ToastUtils 在 kotlin 中转义失败,发布 1.12.5
22
* 18/01/28 修复 ToastUtils 默认样式问题,发布 1.12.2,新增 DeviceUtils#getSDKVersionName,发布 1.12.3
33
* 18/01/27 修复 PermissionUtils 某些机型闪烁问题,发布 1.12.1
44
* 18/01/17 完善 ReflectUtils 及 单元测试,发布 1.12.0 版本

utilcode/README-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Gradle:
44
```groovy
5-
compile 'com.blankj:utilcode:1.12.4'
5+
compile 'com.blankj:utilcode:1.12.5'
66
```
77

88

utilcode/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Gradle:
44
```groovy
5-
compile 'com.blankj:utilcode:1.12.4'
5+
compile 'com.blankj:utilcode:1.12.5'
66
```
77

88

utilcode/src/main/java/com/blankj/utilcode/util/ToastUtils.java

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ public static void showShort(@StringRes final int resId) {
110110
* @param args 参数
111111
*/
112112
public static void showShort(@StringRes final int resId, final Object... args) {
113-
show(resId, Toast.LENGTH_SHORT, args);
113+
if (args != null && args.length == 0) {
114+
show(resId, Toast.LENGTH_SHORT);
115+
} else {
116+
show(resId, Toast.LENGTH_SHORT, args);
117+
}
114118
}
115119

116120
/**
@@ -120,7 +124,11 @@ public static void showShort(@StringRes final int resId, final Object... args) {
120124
* @param args 参数
121125
*/
122126
public static void showShort(final String format, final Object... args) {
123-
show(format, Toast.LENGTH_SHORT, args);
127+
if (args != null && args.length == 0) {
128+
show(format, Toast.LENGTH_SHORT);
129+
} else {
130+
show(format, Toast.LENGTH_SHORT, args);
131+
}
124132
}
125133

126134
/**
@@ -148,7 +156,11 @@ public static void showLong(@StringRes final int resId) {
148156
* @param args 参数
149157
*/
150158
public static void showLong(@StringRes final int resId, final Object... args) {
151-
show(resId, Toast.LENGTH_LONG, args);
159+
if (args != null && args.length == 0) {
160+
show(resId, Toast.LENGTH_SHORT);
161+
} else {
162+
show(resId, Toast.LENGTH_LONG, args);
163+
}
152164
}
153165

154166
/**
@@ -158,7 +170,11 @@ public static void showLong(@StringRes final int resId, final Object... args) {
158170
* @param args 参数
159171
*/
160172
public static void showLong(final String format, final Object... args) {
161-
show(format, Toast.LENGTH_LONG, args);
173+
if (args != null && args.length == 0) {
174+
show(format, Toast.LENGTH_SHORT);
175+
} else {
176+
show(format, Toast.LENGTH_LONG, args);
177+
}
162178
}
163179

164180
/**

0 commit comments

Comments
 (0)