Skip to content

Commit 78cf0c9

Browse files
committed
see 01/02 log
1 parent 1cb90ba commit 78cf0c9

File tree

67 files changed

+339
-308
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+339
-308
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* `19/01/02` [fix] LogUtils log object.
2+
* `19/01/01` [add] GsonUtils.
13
* `18/12/29` [add] AntiShakeUtils and VibrateUtils. Publish v1.22.9.
24
* `18/12/28` [fix] ToastUtils show behind the dialog when close notification.
35
* `18/12/27` [fix] LogUtils print StringBuilder failed.

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.22.9-brightgreen.svg
44+
[aucSvg]: https://img.shields.io/badge/AndroidUtilCode-v1.22.10-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 project helps you a lot and you want to support the project's developmen
4141

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

44-
[aucSvg]: https://img.shields.io/badge/AndroidUtilCode-v1.22.9-brightgreen.svg
44+
[aucSvg]: https://img.shields.io/badge/AndroidUtilCode-v1.22.10-brightgreen.svg
4545
[auc]: https://github.com/Blankj/AndroidUtilCode
4646

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

config.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ ext {
55
compileSdkVersion = 27
66
minSdkVersion = 14
77
targetSdkVersion = 27
8-
versionCode = 1_022_009
9-
versionName = '1.22.9'// E.g. 1.9.72 => 1,009,072
8+
versionCode = 1_022_010
9+
versionName = '1.22.10'// E.g. 1.9.72 => 1,009,072
1010

1111
bus = [
1212
isDebug: false,

lib/base/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ dependencies {
1515
api dep.free_proguard
1616
api 'com.r0adkll:slidableactivity:2.0.5'
1717
compileOnly dep.leakcanary.android_no_op
18-
// api 'com.blankj:utilcode:1.22.9'
18+
// api 'com.blankj:utilcode:1.22.10'
1919
}

lib/base/src/main/java/com/blankj/lib/base/BaseActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ abstract class BaseActivity : AppCompatActivity(), IBaseView {
3636
}
3737

3838
override fun onClick(view: View) {
39-
if (AntiShakeUtils.isValid(view, 200)) {
39+
if (AntiShakeUtils.isValid(view)) {
4040
onWidgetClick(view)
4141
}
4242
}

lib/base/src/main/java/com/blankj/lib/base/BaseFragment.kt

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import android.util.Log
99
import android.view.LayoutInflater
1010
import android.view.View
1111
import android.view.ViewGroup
12+
import com.blankj.utilcode.util.AntiShakeUtils
1213

1314
/**
1415
* ```
@@ -29,18 +30,6 @@ abstract class BaseFragment : Fragment(), IBaseView {
2930
protected lateinit var mInflater: LayoutInflater
3031
protected lateinit var mContentView: View
3132

32-
private var lastClick: Long = 0
33-
34-
private val isFastClick: Boolean
35-
get() {
36-
val now = System.currentTimeMillis()
37-
if (now - lastClick >= 200) {
38-
lastClick = now
39-
return false
40-
}
41-
return true
42-
}
43-
4433
override fun onAttach(context: Context?) {
4534
super.onAttach(context)
4635
mActivity = context as Activity;
@@ -105,7 +94,9 @@ abstract class BaseFragment : Fragment(), IBaseView {
10594
}
10695

10796
override fun onClick(view: View) {
108-
if (!isFastClick) onWidgetClick(view)
97+
if (AntiShakeUtils.isValid(view)) {
98+
onWidgetClick(view)
99+
}
109100
}
110101

111102
fun <T : View> findViewById(@IdRes id: Int): T {

subutil/README-CN.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,6 @@ Instance.isFlashlightOn : 判断闪光灯是否打开
5151
isFlashlightEnable : 判断设备是否支持闪光灯
5252
```
5353

54-
* ### Gson 相关 -> [GsonUtils.java][gson.java] -> [Test][gson.test]
55-
```
56-
getGson : 获取 Gson 对象
57-
toJson : 对象转 Json 串
58-
fromJson: Json 串转对象
59-
```
60-
6154
* ### 定位相关 -> [LocationUtils.java][location.java] -> [Demo][location.demo]
6255
```
6356
isGpsEnabled : 判断 Gps 是否可用

subutil/lib/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ readme {
1515
dependencies {
1616
compileOnly dep.support.appcompat_v7
1717
compileOnly dep.support.design
18-
api dep.gson
1918
api(dep.glide) {
2019
exclude group: "com.android.support"
2120
}

subutil/pkg/src/main/java/com/blankj/subutil/pkg/feature/SubUtilActivity.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.content.Context;
44
import android.content.Intent;
55
import android.os.Bundle;
6+
import android.support.annotation.NonNull;
67
import android.support.annotation.Nullable;
78
import android.view.View;
89

@@ -41,7 +42,7 @@ public int bindLayout() {
4142
}
4243

4344
@Override
44-
public void initView(Bundle savedInstanceState, View contentView) {
45+
public void initView(Bundle savedInstanceState, @NonNull View contentView) {
4546
setTitle(R.string.sub_util);
4647
}
4748

@@ -51,7 +52,7 @@ public void doBusiness() {
5152
}
5253

5354
@Override
54-
public void onWidgetClick(View view) {
55+
public void onWidgetClick(@NonNull View view) {
5556

5657
}
5758

0 commit comments

Comments
 (0)