Skip to content

Commit 050efe2

Browse files
committed
see 11/16 log
1 parent 20712d6 commit 050efe2

File tree

163 files changed

+4844
-261
lines changed

Some content is hidden

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

163 files changed

+4844
-261
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ buildscript {
1818
classpath dep.android_maven_gradle_plugin
1919
classpath dep.gradle_bintray_plugin
2020

21-
// classpath dep.bus_gradle_plugin
21+
classpath dep.bus_gradle_plugin
2222
}
2323
}
2424

config.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ ext {
2727
support : [
2828
appcompat_v7: "com.android.support:appcompat-v7:$support_version",
2929
design : "com.android.support:design:$support_version",
30+
multidex : "com.android.support:multidex:1.0.2",
3031
],
3132
constraint : "com.android.support.constraint:constraint-layout:1.1.3",
3233
kotlin : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version",
@@ -91,6 +92,7 @@ def configAppAndroidDomain(Project pro, String applicationIdSuffix = "") {
9192
defaultConfig {
9293
applicationId rootProject.applicationId + applicationIdSuffix
9394
targetSdkVersion rootProject.targetSdkVersion
95+
multiDexEnabled true
9496
}
9597

9698
buildTypes {
@@ -105,6 +107,12 @@ def configAppAndroidDomain(Project pro, String applicationIdSuffix = "") {
105107
main.res.srcDirs += 'src/main/res-sub'
106108
}
107109
}
110+
111+
pro.dependencies {
112+
// LeakCanary
113+
debugImplementation dep.leakcanary.android
114+
releaseImplementation dep.leakcanary.android_no_op
115+
}
108116
}
109117

110118
def configField(Project pro) {
@@ -159,5 +167,4 @@ def configLibAndroidDomain(Project pro) {
159167
}
160168
}
161169

162-
163170
//./gradlew utilcode:bintrayUpload

launcher/app/build.gradle

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,13 @@ plugins {
22
id "com.android.application"
33
id 'kotlin-android'
44
id 'kotlin-android-extensions'
5-
// id "com.blankj.bus"
5+
id "com.blankj.bus"
66
}
7+
78
// in config.gradle
89
configAndroidDomain project
910

1011
dependencies {
1112
implementation fileTree(dir: 'libs', include: ['*.jar'])
12-
// implementation project(':applauncher')
13-
// implementation project(':subutil')
14-
15-
implementation dep.support.appcompat_v7
16-
implementation dep.support.design
17-
implementation dep.constraint
18-
implementation dep.kotlin
19-
implementation dep.free_proguard
20-
implementation 'com.r0adkll:slidableactivity:2.0.5'
21-
// LeakCanary
22-
debugImplementation dep.leakcanary.android
23-
releaseImplementation dep.leakcanary.android_no_op
24-
// implementation 'com.blankj:utilcode:1.21.2'
13+
implementation project(':launcher-pkg')
2514
}

launcher/app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,4 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="com.blankj.launcher">
44

5-
<application
6-
android:allowBackup="true"
7-
android:icon="@mipmap/ic_launcher"
8-
android:label="@string/app_name"
9-
android:roundIcon="@mipmap/ic_launcher_round"
10-
android:supportsRtl="true"
11-
android:theme="@style/AppTheme">
12-
<activity android:name=".MainActivity">
13-
<intent-filter>
14-
<action android:name="android.intent.action.MAIN" />
15-
16-
<category android:name="android.intent.category.LAUNCHER" />
17-
</intent-filter>
18-
</activity>
19-
</application>
20-
215
</manifest>

launcher/app/src/main/res/layout/activity_main.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
xmlns:tools="http://schemas.android.com/tools"
66
android:layout_width="match_parent"
77
android:layout_height="match_parent"
8-
tools:context=".MainActivity">
8+
tools:context=".pkg.MainActivity">
99

1010
<TextView
1111
android:layout_width="wrap_content"

launcher/pkg/build.gradle

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,14 @@
1-
apply plugin: 'com.android.library'
2-
3-
android {
4-
compileSdkVersion 28
5-
6-
7-
8-
defaultConfig {
9-
minSdkVersion 14
10-
targetSdkVersion 28
11-
versionCode 1
12-
versionName "1.0"
13-
14-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
15-
16-
}
17-
18-
buildTypes {
19-
release {
20-
minifyEnabled false
21-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
22-
}
23-
}
24-
1+
plugins {
2+
id "com.android.library"
3+
id 'kotlin-android'
4+
id 'kotlin-android-extensions'
5+
// id "com.blankj.bus"
256
}
267

8+
// in config.gradle
9+
configAndroidDomain project
10+
2711
dependencies {
2812
implementation fileTree(dir: 'libs', include: ['*.jar'])
29-
30-
implementation 'com.android.support:appcompat-v7:28.0.0'
31-
testImplementation 'junit:junit:4.12'
32-
androidTestImplementation 'com.android.support.test:runner:1.0.2'
33-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
34-
}
13+
implementation project(':lib-base')
14+
}

launcher/pkg/src/androidTest/java/com/blankj/pkg/ExampleInstrumentedTest.java

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,70 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.blankj.pkg" />
2+
package="com.blankj.launcher.pkg">
3+
4+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
5+
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
6+
7+
<!-- bar -->
8+
<uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
9+
10+
<!-- 读写内存 -->
11+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
12+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
13+
14+
<!-- network -->
15+
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
16+
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
17+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
18+
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
19+
<uses-permission android:name="android.permission.INTERNET" />
20+
21+
<!-- permission -->
22+
<uses-permission android:name="android.permission.READ_CALENDAR" />
23+
<uses-permission android:name="android.permission.RECORD_AUDIO" />
24+
25+
<!-- phone -->
26+
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
27+
<uses-permission android:name="android.permission.CALL_PHONE" />
28+
<uses-permission android:name="android.permission.SEND_SMS" />
29+
<uses-permission android:name="android.permission.READ_SMS" />
30+
<uses-permission android:name="android.permission.READ_CONTACTS" />
31+
32+
<!-- process -->
33+
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
34+
35+
<!-- screen -->
36+
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
37+
38+
<!-- flashlight -->
39+
<uses-permission android:name="android.permission.CAMERA" />
40+
<uses-permission android:name="android.permission.FLASHLIGHT" />
41+
42+
<!-- location -->
43+
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
44+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
45+
46+
<application
47+
android:name=".UtilsApp"
48+
android:allowBackup="false"
49+
android:icon="@mipmap/ic_launcher"
50+
android:label="@string/app_name"
51+
android:theme="@style/AppTheme">
52+
<activity
53+
android:name=".SplashActivity"
54+
android:screenOrientation="user"
55+
android:windowSoftInputMode="stateHidden|adjustPan">
56+
<intent-filter>
57+
<action android:name="android.intent.action.MAIN" />
58+
<action android:name="android.intent.action.VIEW" />
59+
60+
<category android:name="android.intent.category.LAUNCHER" />
61+
</intent-filter>
62+
</activity>
63+
64+
<activity
65+
android:name=".MainActivity"
66+
android:screenOrientation="user"
67+
android:windowSoftInputMode="stateHidden|adjustPan" />
68+
</application>
69+
70+
</manifest>
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
package com.blankj.launcher.pkg;
2+
3+
import android.graphics.Color;
4+
import android.os.Bundle;
5+
import android.support.annotation.Nullable;
6+
import android.support.design.widget.CollapsingToolbarLayout;
7+
import android.support.v7.app.ActionBarDrawerToggle;
8+
import android.support.v7.widget.Toolbar;
9+
import android.view.View;
10+
11+
import com.blankj.base.BaseDrawerActivity;
12+
import com.blankj.pkg.R;
13+
import com.blankj.utilcode.util.BarUtils;
14+
import com.blankj.utilcode.util.BusUtils;
15+
16+
/**
17+
* <pre>
18+
* author: Blankj
19+
* blog : http://blankj.com
20+
* time : 2016/09/29
21+
* desc : MainActivity
22+
* </pre>
23+
*/
24+
public class MainActivity extends BaseDrawerActivity {
25+
26+
@Override
27+
public void initData(@Nullable Bundle bundle) {
28+
29+
}
30+
31+
@Override
32+
public int bindLayout() {
33+
return R.layout.activity_main;
34+
}
35+
36+
@Override
37+
public void initView(Bundle savedInstanceState, View contentView) {
38+
Toolbar toolbar = findViewById(R.id.toolbar);
39+
View fakeStatusBar = findViewById(R.id.fake_status_bar);
40+
CollapsingToolbarLayout ctl = findViewById(R.id.ctl);
41+
ctl.setExpandedTitleColor(Color.TRANSPARENT);
42+
setSupportActionBar(toolbar);
43+
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this,
44+
rootLayout,
45+
toolbar,
46+
R.string.navigation_drawer_open,
47+
R.string.navigation_drawer_close);
48+
rootLayout.addDrawerListener(toggle);
49+
toggle.syncState();
50+
51+
BarUtils.setStatusBarAlpha4Drawer(this, rootLayout, fakeStatusBar, 0, false);
52+
BarUtils.addMarginTopEqualStatusBarHeight(toolbar);
53+
}
54+
55+
@Override
56+
public void doBusiness() {
57+
58+
}
59+
60+
@Override
61+
public void onWidgetClick(View view) {
62+
63+
}
64+
65+
public void coreUtilClick(View view) {
66+
BusUtils.post("CoreUtilActivity#start", this);
67+
}
68+
69+
public void subUtilClick(View view) {
70+
BusUtils.post("SubUtilActivity#start", this);
71+
}
72+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package com.blankj.launcher.pkg
2+
3+
import android.os.Bundle
4+
import android.view.View
5+
import com.blankj.base.BaseActivity
6+
7+
class SplashActivity : BaseActivity() {
8+
9+
override fun initData(bundle: Bundle?) {
10+
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
11+
}
12+
13+
override fun bindLayout(): Int {
14+
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
15+
}
16+
17+
override fun initView(savedInstanceState: Bundle?, contentView: View?) {
18+
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
19+
}
20+
21+
override fun doBusiness() {
22+
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
23+
}
24+
25+
override fun onWidgetClick(view: View?) {
26+
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
27+
}
28+
}

0 commit comments

Comments
 (0)