Skip to content

Commit 0d3390c

Browse files
committed
see 06/05 log
1 parent c27ba55 commit 0d3390c

File tree

114 files changed

+294
-294
lines changed

Some content is hidden

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

114 files changed

+294
-294
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@
99
.externalNativeBuild
1010
/apk
1111
*.phrof
12-
/busMaven
Binary file not shown.

busMaven/com/blankj/bus-gradle-plugin/1.7.0/bus-gradle-plugin-1.7.0-groovydoc.jar.md5

Lines changed: 0 additions & 1 deletion
This file was deleted.

busMaven/com/blankj/bus-gradle-plugin/1.7.0/bus-gradle-plugin-1.7.0-groovydoc.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.
Binary file not shown.

busMaven/com/blankj/bus-gradle-plugin/1.7.0/bus-gradle-plugin-1.7.0-javadoc.jar.md5

Lines changed: 0 additions & 1 deletion
This file was deleted.

busMaven/com/blankj/bus-gradle-plugin/1.7.0/bus-gradle-plugin-1.7.0-javadoc.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.
Binary file not shown.

busMaven/com/blankj/bus-gradle-plugin/1.7.0/bus-gradle-plugin-1.7.0-sources.jar.md5

Lines changed: 0 additions & 1 deletion
This file was deleted.

busMaven/com/blankj/bus-gradle-plugin/1.7.0/bus-gradle-plugin-1.7.0-sources.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.
Binary file not shown.

busMaven/com/blankj/bus-gradle-plugin/1.7.0/bus-gradle-plugin-1.7.0.jar.md5

Lines changed: 0 additions & 1 deletion
This file was deleted.

busMaven/com/blankj/bus-gradle-plugin/1.7.0/bus-gradle-plugin-1.7.0.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.

busMaven/com/blankj/bus-gradle-plugin/1.7.0/bus-gradle-plugin-1.7.0.pom

Lines changed: 0 additions & 40 deletions
This file was deleted.

busMaven/com/blankj/bus-gradle-plugin/1.7.0/bus-gradle-plugin-1.7.0.pom.md5

Lines changed: 0 additions & 1 deletion
This file was deleted.

busMaven/com/blankj/bus-gradle-plugin/1.7.0/bus-gradle-plugin-1.7.0.pom.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.

busMaven/com/blankj/bus-gradle-plugin/maven-metadata.xml

Lines changed: 0 additions & 12 deletions
This file was deleted.

busMaven/com/blankj/bus-gradle-plugin/maven-metadata.xml.md5

Lines changed: 0 additions & 1 deletion
This file was deleted.

busMaven/com/blankj/bus-gradle-plugin/maven-metadata.xml.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.

gradle/config/config.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ gradle.ext {
3232
launcher_app : new DepConfig(":launcher:app"),
3333
launcher_pkg : new DepConfig(":launcher:pkg"),
3434
lib_base : new DepConfig(":lib:base"),
35+
lib_common : new DepConfig(":lib:common"),
3536
subutil_app : new DepConfig(":subutil:app"),
3637
subutil_lib : new DepConfig(":subutil:lib"),
3738
subutil_pkg : new DepConfig(":subutil:pkg"),

launcher/app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apply {
44

55
dependencies {
66
implementation fileTree(dir: 'libs', include: ['*.jar'])
7-
implementation project(':launcher:pkg')
8-
implementation project(':subutil:pkg')
9-
implementation project(':utilcode:pkg')
7+
implementation gradle.ext.dep.launcher_pkg
8+
implementation gradle.ext.dep.subutil_pkg
9+
implementation gradle.ext.dep.utilcode_pkg
1010
}

launcher/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
package="com.blankj.launcher.app">
44

55
<application
6-
android:name=".UtilsApp"
6+
android:name=".LauncherApp"
77
android:allowBackup="false"
88
android:icon="@mipmap/ic_launcher"
99
android:label="@string/app_name"

launcher/app/src/main/java/com/blankj/launcher/app/UtilsApp.java renamed to launcher/app/src/main/java/com/blankj/launcher/app/LauncherApp.java

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

33
import android.content.Context;
44

5-
import com.blankj.lib.base.BaseApplication;
5+
import com.blankj.lib.common.CommonApplication;
66

77
/**
88
* <pre>
@@ -12,11 +12,11 @@
1212
* desc : app about utils
1313
* </pre>
1414
*/
15-
public class UtilsApp extends BaseApplication {
15+
public class LauncherApp extends CommonApplication {
1616

17-
private static UtilsApp sInstance;
17+
private static LauncherApp sInstance;
1818

19-
public static UtilsApp getInstance() {
19+
public static LauncherApp getInstance() {
2020
return sInstance;
2121
}
2222

launcher/pkg/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ apply {
44

55
dependencies {
66
implementation fileTree(dir: 'libs', include: ['*.jar'])
7-
api project(':lib:base')
7+
api gradle.ext.dep.lib_common
88
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import android.os.Bundle
55
import android.support.v7.app.ActionBarDrawerToggle
66
import android.view.View
77
import android.widget.ImageView
8-
import com.blankj.lib.base.BaseDrawerActivity
8+
import com.blankj.lib.common.CommonDrawerActivity
99
import com.blankj.utilcode.constant.PermissionConstants
1010
import com.blankj.utilcode.util.*
1111
import kotlinx.android.synthetic.main.activity_main.*
@@ -19,7 +19,7 @@ import kotlinx.android.synthetic.main.activity_main.*
1919
* desc : MainActivity
2020
* ```
2121
*/
22-
class MainActivity : BaseDrawerActivity() {
22+
class MainActivity : CommonDrawerActivity() {
2323

2424
override fun initData(bundle: Bundle?) {
2525

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ package com.blankj.launcher.pkg
22

33
import android.os.Bundle
44
import android.view.View
5-
import com.blankj.lib.base.BaseActivity
5+
import com.blankj.lib.common.CommonBackActivity
66

7-
class SplashActivity : BaseActivity() {
7+
class SplashActivity : CommonBackActivity() {
88
override fun isSwipeBack(): Boolean {
99
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
1010
}

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

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

11-
import com.blankj.swipepanel.SwipePanel;
1211
import com.blankj.utilcode.util.AntiShakeUtils;
13-
import com.blankj.utilcode.util.AppUtils;
14-
import com.blankj.utilcode.util.SizeUtils;
15-
import com.blankj.utilcode.util.ToastUtils;
16-
import com.blankj.utilcode.util.Utils;
1712

1813
/**
1914
* <pre>
@@ -29,35 +24,14 @@ public abstract class BaseActivity extends AppCompatActivity
2924
protected View mContentView;
3025
protected Activity mActivity;
3126

32-
public abstract boolean isSwipeBack();
33-
34-
/**
35-
* 上次点击时间
36-
*/
37-
private long lastClick = 0;
38-
3927
@Override
4028
protected void onCreate(Bundle savedInstanceState) {
4129
mActivity = this;
4230
super.onCreate(savedInstanceState);
4331
initData(getIntent().getExtras());
4432
setRootLayout(bindLayout());
45-
findViewById(android.R.id.content).setBackgroundColor(getResources().getColor(R.color.mediumGray));
4633
initView(savedInstanceState, mContentView);
4734
doBusiness();
48-
initSwipeBack();
49-
50-
AppUtils.registerAppStatusChangedListener(this, new Utils.OnAppStatusChangedListener() {
51-
@Override
52-
public void onForeground() {
53-
ToastUtils.showShort("foreground");
54-
}
55-
56-
@Override
57-
public void onBackground() {
58-
ToastUtils.showShort("background");
59-
}
60-
});
6135
}
6236

6337
@SuppressLint("ResourceType")
@@ -73,27 +47,5 @@ public void onClick(View view) {
7347
onWidgetClick(view);
7448
}
7549
}
76-
77-
@Override
78-
protected void onDestroy() {
79-
super.onDestroy();
80-
AppUtils.unregisterAppStatusChangedListener(this);
81-
}
82-
83-
private void initSwipeBack() {
84-
if (isSwipeBack()) {
85-
final SwipePanel swipeLayout = new SwipePanel(this);
86-
swipeLayout.setLeftDrawable(R.drawable.base_back);
87-
swipeLayout.setLeftEdgeSize(SizeUtils.dp2px(100));
88-
swipeLayout.wrapView(findViewById(android.R.id.content));
89-
swipeLayout.setOnFullSwipeListener(new SwipePanel.OnFullSwipeListener() {
90-
@Override
91-
public void onFullSwipe(int direction) {
92-
swipeLayout.close(direction);
93-
finish();
94-
}
95-
});
96-
}
97-
}
9850
}
9951

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
import android.app.Application;
44
import android.content.Context;
55
import android.support.multidex.MultiDex;
6-
7-
import com.blankj.utilcode.util.AppUtils;
8-
import com.blankj.utilcode.util.CrashUtils;
9-
import com.blankj.utilcode.util.LogUtils;
6+
import com.blankj.utilcode.util.*;
107
import com.squareup.leakcanary.LeakCanary;
118

129
import java.util.ArrayList;
@@ -28,6 +25,7 @@ public static BaseApplication getInstance() {
2825
}
2926

3027
private Boolean isDebug;
28+
private Boolean isMainProcess;
3129

3230
@Override
3331
protected void attachBaseContext(Context base) {
@@ -100,4 +98,9 @@ private boolean isDebug() {
10098
if (isDebug == null) isDebug = AppUtils.isAppDebug();
10199
return isDebug;
102100
}
101+
102+
public boolean isMainProcess() {
103+
if (isMainProcess == null) isMainProcess = ProcessUtils.isMainProcess();
104+
return isMainProcess;
105+
}
103106
}

lib/common/.gitignore

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

lib/common/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apply {
2+
from "${rootDir.path}/gradle/config/configLib.gradle"
3+
}
4+
5+
dependencies {
6+
implementation fileTree(dir: 'libs', include: ['*.jar'])
7+
api gradle.ext.dep.lib_base
8+
}

lib/common/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.common" />
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.blankj.lib.common;
2+
3+
import com.blankj.lib.base.BaseApplication;
4+
5+
/**
6+
* <pre>
7+
* author: blankj
8+
* blog : http://blankj.com
9+
* time : 2019/06/05
10+
* desc :
11+
* </pre>
12+
*/
13+
public class CommonApplication extends BaseApplication {
14+
15+
@Override
16+
public void onCreate() {
17+
super.onCreate();
18+
}
19+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
package com.blankj.lib.common;
2+
3+
import android.os.Bundle;
4+
5+
import com.blankj.common.R;
6+
import com.blankj.lib.base.BaseActivity;
7+
import com.blankj.swipepanel.SwipePanel;
8+
import com.blankj.utilcode.util.SizeUtils;
9+
10+
/**
11+
* <pre>
12+
* author: blankj
13+
* blog : http://blankj.com
14+
* time : 2019/06/05
15+
* desc :
16+
* </pre>
17+
*/
18+
public abstract class CommonBackActivity extends BaseActivity {
19+
20+
public abstract boolean isSwipeBack();
21+
22+
@Override
23+
protected void onCreate(Bundle savedInstanceState) {
24+
super.onCreate(savedInstanceState);
25+
findViewById(android.R.id.content).setBackgroundColor(getResources().getColor(R.color.mediumGray));
26+
initSwipeBack();
27+
}
28+
29+
private void initSwipeBack() {
30+
if (isSwipeBack()) {
31+
final SwipePanel swipeLayout = new SwipePanel(this);
32+
swipeLayout.setLeftDrawable(R.drawable.base_back);
33+
swipeLayout.setLeftEdgeSize(SizeUtils.dp2px(100));
34+
swipeLayout.wrapView(findViewById(android.R.id.content));
35+
swipeLayout.setOnFullSwipeListener(new SwipePanel.OnFullSwipeListener() {
36+
@Override
37+
public void onFullSwipe(int direction) {
38+
swipeLayout.close(direction);
39+
finish();
40+
}
41+
});
42+
}
43+
}
44+
}

0 commit comments

Comments
 (0)