Skip to content

Commit acc1923

Browse files
committed
see 11/18 log
1 parent 050efe2 commit acc1923

File tree

65 files changed

+602
-1207
lines changed

Some content is hidden

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

65 files changed

+602
-1207
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
* `18/11/18` [fix] ToastUtils don't show in the devices grater than API 24 when close the permission of notification. Publish v1.22.0.
2+
* `18/11/17` [fix] AppUtils#isAppInstalled don't work in no launcher app.
3+
* `18/11/16` [fix] ThreadUtils#cancel block the main thread.
14
* `18/11/15` [add] module of bus-gradle-plugin and change style of gradle.
25
* `18/11/14` [add] BusUtils.
36
* `18/11/13` [add] AdaptScreenUtils.

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.21.2-brightgreen.svg
44+
[aucSvg]: https://img.shields.io/badge/AndroidUtilCode-v1.22.0-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.21.2-brightgreen.svg
44+
[aucSvg]: https://img.shields.io/badge/AndroidUtilCode-v1.22.0-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
@@ -21,5 +21,5 @@ dependencies {
2121
// LeakCanary
2222
debugImplementation dep.leakcanary.android
2323
releaseImplementation dep.leakcanary.android_no_op
24-
// implementation 'com.blankj:utilcode:1.21.2'
24+
// implementation 'com.blankj:utilcode:1.22.0'
2525
}

app/src/main/java/com/blankj/androidutilcode/base/BaseBackActivity.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import android.support.v7.app.ActionBar;
99
import android.support.v7.widget.Toolbar;
1010
import android.view.LayoutInflater;
11-
import android.view.MenuItem;
1211
import android.widget.FrameLayout;
1312

1413
import com.blankj.androidutilcode.R;
@@ -43,7 +42,7 @@ protected void setBaseView(@LayoutRes int layoutId) {
4342
mToolbar = findViewById(R.id.toolbar);
4443
flActivityContainer = findViewById(R.id.activity_container);
4544
if (layoutId > 0) {
46-
flActivityContainer.addView(LayoutInflater.from(this).inflate(layoutId, flActivityContainer, false));
45+
LayoutInflater.from(this).inflate(layoutId, flActivityContainer);
4746
}
4847
setSupportActionBar(mToolbar);
4948
getToolBar().setDisplayHomeAsUpEnabled(true);
@@ -52,14 +51,6 @@ protected void setBaseView(@LayoutRes int layoutId) {
5251
BarUtils.addMarginTopEqualStatusBarHeight(rootLayout);
5352
}
5453

55-
@Override
56-
public boolean onOptionsItemSelected(MenuItem item) {
57-
if (item.getItemId() == android.R.id.home) {
58-
finish();
59-
}
60-
return super.onOptionsItemSelected(item);
61-
}
62-
6354
protected ActionBar getToolBar() {
6455
return getSupportActionBar();
6556
}

app/src/main/java/com/blankj/androidutilcode/base/BaseFragment.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import android.app.Activity;
44
import android.os.Bundle;
55
import android.support.annotation.IdRes;
6-
import android.support.annotation.LayoutRes;
76
import android.support.annotation.NonNull;
87
import android.support.annotation.Nullable;
98
import android.support.v4.app.Fragment;
@@ -52,13 +51,13 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
5251
@Override
5352
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
5453
Log.d(TAG, "onCreateView: ");
55-
setBaseView(inflater, bindLayout());
54+
setRootLayout(bindLayout());
5655
return mContentView;
5756
}
5857

59-
protected void setBaseView(@NonNull LayoutInflater inflater, @LayoutRes int layoutId) {
58+
protected void setRootLayout(int layoutId) {
6059
if (layoutId <= 0) return;
61-
mContentView = inflater.inflate(layoutId, null);
60+
mContentView = mActivity.getLayoutInflater().inflate(layoutId, null);
6261
}
6362

6463
@Override

app/src/main/java/com/blankj/androidutilcode/base/BaseKotlinActivity.kt

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

config.gradle

Lines changed: 15 additions & 11 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_021_003
9-
versionName = '1.21.3'// E.g. 1.9.72 => 1,009,072
8+
versionCode = 1_022_000
9+
versionName = '1.22.0'// E.g. 1.9.72 => 1,009,072
1010

1111
localDebugPlugin = false
1212

@@ -53,10 +53,10 @@ ext {
5353
configAppDependencies = this.&configAppDependencies
5454
}
5555

56-
def configAndroidDomain(Project pro, String applicationIdSuffix = "") {
56+
def configAndroidDomain(Project pro) {
5757
configCommon(pro)
5858
if (pro.plugins.hasPlugin("com.android.application")) {
59-
configAppAndroidDomain(pro, applicationIdSuffix)
59+
configAppAndroidDomain(pro)
6060
} else {
6161
configLibAndroidDomain(pro)
6262
}
@@ -84,15 +84,16 @@ def configCommon(Project pro) {
8484
}
8585

8686

87-
def configAppAndroidDomain(Project pro, String applicationIdSuffix = "") {
88-
configField(pro)
87+
def configAppAndroidDomain(Project pro) {
8988
configSigning(pro)
9089
configApkName(pro)
90+
String suffix = getSuffix(pro)
9191
pro.android {
9292
defaultConfig {
93-
applicationId rootProject.applicationId + applicationIdSuffix
93+
applicationId rootProject.applicationId + suffix
9494
targetSdkVersion rootProject.targetSdkVersion
9595
multiDexEnabled true
96+
resValue "string", "app_name", rootProject.appName + suffix
9697
}
9798

9899
buildTypes {
@@ -115,10 +116,13 @@ def configAppAndroidDomain(Project pro, String applicationIdSuffix = "") {
115116
}
116117
}
117118

118-
def configField(Project pro) {
119-
pro.android.defaultConfig {
120-
resValue "string", "app_name", rootProject.appName
119+
private static String getSuffix(Project pro) {
120+
String[] splits = pro.name.split("-")
121+
String suffix = ""
122+
if (splits.length == 2) {
123+
suffix = "." + splits[0]
121124
}
125+
return suffix
122126
}
123127

124128
def configSigning(Project pro) {
@@ -167,4 +171,4 @@ def configLibAndroidDomain(Project pro) {
167171
}
168172
}
169173

170-
//./gradlew utilcode:bintrayUpload
174+
//./gradlew clean utilcode-lib:bintrayUpload

launcher/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ 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
}
77

88
// in config.gradle

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

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

0 commit comments

Comments
 (0)