Skip to content

Commit 7060007

Browse files
committed
see 06/18 log
1 parent 31bcebb commit 7060007

File tree

108 files changed

+20276
-752
lines changed

Some content is hidden

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

108 files changed

+20276
-752
lines changed

gradle/config/config.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ gradle.ext {
88
compileSdkVersion = 27
99
minSdkVersion = 14
1010
targetSdkVersion = 27
11-
versionCode = 1_024_002
12-
versionName = '1.24.2'// E.g. 1.9.72 => 1,009,072
11+
versionCode = 1_024_003
12+
versionName = '1.24.3'// E.g. 1.9.72 => 1,009,072
1313

1414
// lib version
1515
kotlin_version = '1.3.10'
@@ -33,10 +33,14 @@ gradle.ext {
3333
launcher_pkg : new DepConfig(":launcher:pkg"),
3434
lib_base : new DepConfig(":lib:base"),
3535
lib_common : new DepConfig(":lib:common"),
36+
3637
subutil_app : new DepConfig(":subutil:app"),
38+
subutil_export : new DepConfig(":subutil:export"),
3739
subutil_lib : new DepConfig(":subutil:lib"),
3840
subutil_pkg : new DepConfig(":subutil:pkg"),
41+
3942
utilcode_app : new DepConfig(":utilcode:app"),
43+
utilcode_export : new DepConfig(":utilcode:export"),
4044
utilcode_lib : new DepConfig(true/*是否本地调试*/, ":utilcode:lib", "com.blankj:utilcode:$versionName"),
4145
utilcode_pkg : new DepConfig(":utilcode:pkg"),
4246

launcher/pkg/src/main/java/com/blankj/launcher/pkg/MainActivity.kt

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,20 @@ class MainActivity : CommonDrawerActivity() {
5555
BarUtils.setStatusBarColor4Drawer(mBaseDrawerRootLayout, launcherMainFakeStatusBar, Color.TRANSPARENT, false)
5656
BarUtils.addMarginTopEqualStatusBarHeight(launcherMainToolbar)
5757

58-
launcherMainCoreUtilBtn.setOnClickListener {
59-
BusUtils.postStatic<Any>("CoreUtilActivity#start", this)
60-
}
61-
62-
launcherMainSubUtilBtn.setOnClickListener {
63-
BusUtils.postStatic<Any>("SubUtilActivity#start", this)
64-
}
58+
applyDebouncingClickListener(
59+
launcherMainCoreUtilBtn,
60+
launcherMainSubUtilBtn
61+
)
6562
}
6663

6764
override fun doBusiness() {}
6865

69-
override fun onWidgetClick(view: View) {}
66+
override fun onDebouncingClick(view: View) {
67+
when (view.id) {
68+
R.id.launcherMainCoreUtilBtn -> BusUtils.postStatic<Any>("CoreUtilActivity#start", this)
69+
R.id.launcherMainSubUtilBtn -> BusUtils.postStatic<Any>("SubUtilActivity#start", this)
70+
}
71+
}
7072

7173
override fun onBackPressed() {
7274
ActivityUtils.startHomeActivity()

launcher/pkg/src/main/java/com/blankj/launcher/pkg/SplashActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class SplashActivity : CommonBackActivity() {
2525
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
2626
}
2727

28-
override fun onWidgetClick(view: View) {
28+
override fun onDebouncingClick(view: View) {
2929
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
3030
}
3131
}

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

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import android.view.LayoutInflater;
99
import android.view.View;
1010

11-
import com.blankj.utilcode.util.AntiShakeUtils;
11+
import com.blankj.utilcode.util.ClickUtils;
1212

1313
/**
1414
* <pre>
@@ -21,6 +21,13 @@
2121
public abstract class BaseActivity extends AppCompatActivity
2222
implements IBaseView {
2323

24+
private View.OnClickListener mClickListener = new View.OnClickListener() {
25+
@Override
26+
public void onClick(View v) {
27+
onDebouncingClick(v);
28+
}
29+
};
30+
2431
protected View mContentView;
2532
protected Activity mActivity;
2633

@@ -41,11 +48,9 @@ public void setRootLayout(@LayoutRes int layoutId) {
4148
setContentView(mContentView = LayoutInflater.from(this).inflate(layoutId, null));
4249
}
4350

44-
@Override
45-
public void onClick(View view) {
46-
if (AntiShakeUtils.isValid(view)) {
47-
onWidgetClick(view);
48-
}
51+
public void applyDebouncingClickListener(View... views) {
52+
ClickUtils.applyGlobalDebouncing(views, mClickListener);
53+
ClickUtils.applyScale(views);
4954
}
5055
}
5156

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import android.view.View;
1616
import android.view.ViewGroup;
1717

18-
import com.blankj.utilcode.util.AntiShakeUtils;
18+
import com.blankj.utilcode.util.ClickUtils;
1919

2020
/**
2121
* <pre>
@@ -31,12 +31,17 @@ public abstract class BaseFragment extends Fragment
3131
private static final String TAG = "BaseFragment";
3232
private static final String STATE_SAVE_IS_HIDDEN = "STATE_SAVE_IS_HIDDEN";
3333

34+
private ClickUtils.OnDebouncingClickListener mDebouncingClick = new ClickUtils.OnDebouncingClickListener() {
35+
@Override
36+
public void onDebouncingClick(View v) {
37+
BaseFragment.this.onDebouncingClick(v);
38+
}
39+
};
40+
3441
protected Activity mActivity;
3542
protected LayoutInflater mInflater;
3643
protected View mContentView;
3744

38-
private long lastClick = 0;
39-
4045
@Override
4146
public void onAttach(Context context) {
4247
super.onAttach(context);
@@ -113,9 +118,8 @@ public void onDestroy() {
113118
super.onDestroy();
114119
}
115120

116-
@Override
117-
public void onClick(View view) {
118-
if (AntiShakeUtils.isValid(view)) onWidgetClick(view);
121+
public void applyDebouncingClickListener(View... views) {
122+
ClickUtils.applyGlobalDebouncing(views, mDebouncingClick);
119123
}
120124

121125
public <T extends View> T findViewById(@IdRes int id) {

lib/base/src/main/java/com/blankj/lib/base/IBaseView.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import android.os.Bundle;
44
import android.support.annotation.LayoutRes;
5+
import android.support.annotation.NonNull;
56
import android.support.annotation.Nullable;
67
import android.view.View;
78

@@ -14,8 +15,7 @@
1415
* desc :
1516
* </pre>
1617
*/
17-
public interface IBaseView extends View.OnClickListener {
18-
18+
public interface IBaseView {
1919

2020
void initData(@Nullable Bundle bundle);
2121

@@ -27,5 +27,5 @@ public interface IBaseView extends View.OnClickListener {
2727

2828
void doBusiness();
2929

30-
void onWidgetClick(View view);
30+
void onDebouncingClick(@NonNull View view);
3131
}

subutil/export/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

subutil/export/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
apply {
2+
from "${rootDir.path}/gradle/config/configLib.gradle"
3+
}

subutil/export/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<manifest package="com.blankj.subutil.export" />
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.blankj.subutil.export.api;
2+
3+
import android.content.Context;
4+
5+
/**
6+
* <pre>
7+
* author: blankj
8+
* blog : http://blankj.com
9+
* time : 2019/06/09
10+
* desc :
11+
* </pre>
12+
*/
13+
public interface SubUtilApi {
14+
15+
void startSubUtilActivity(Context context);
16+
}

subutil/lib/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ readme {
1515
dependencies {
1616
compileOnly gradle.ext.dep.support_appcompat_v7
1717
compileOnly gradle.ext.dep.support_design
18+
compileOnly gradle.ext.dep.utilcode_lib
1819
api(gradle.ext.dep.glide) {
1920
exclude group: "com.android.support"
2021
}
Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.blankj.subutil">
3-
4-
<application>
5-
<provider
6-
android:name=".util.Utils$ContentProvider4SubUtil"
7-
android:authorities="${applicationId}.subutil.content.provider"
8-
android:exported="false"
9-
android:multiprocess="true" />
10-
</application>
11-
</manifest>
1+
<manifest package="com.blankj.subutil" />

0 commit comments

Comments
 (0)