提交 e5b5bcc2 编写于 作者: B Blankj

see 05/02 log

上级 9409d890
......@@ -41,7 +41,7 @@
[logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.14.1-brightgreen.svg
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.14.2-brightgreen.svg
[auc]: https://github.com/Blankj/AndroidUtilCode
[apisvg]: https://img.shields.io/badge/API-14+-brightgreen.svg
......
......@@ -41,7 +41,7 @@ If this project helps you a lot and you want to support the project's developmen
[logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.14.1-brightgreen.svg
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.14.2-brightgreen.svg
[auc]: https://github.com/Blankj/AndroidUtilCode
[apisvg]: https://img.shields.io/badge/API-14+-brightgreen.svg
......
......@@ -56,7 +56,7 @@ dependencies {
// LeakCanary
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakcanary_version"
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakcanary_version"
// implementation 'com.blankj:utilcode:1.14.1'
// implementation 'com.blankj:utilcode:1.14.2'
}
package com.blankj.androidutilcode.base;
import android.annotation.SuppressLint;
import android.support.annotation.LayoutRes;
import android.support.design.widget.AppBarLayout;
import android.support.design.widget.CoordinatorLayout;
......@@ -31,6 +32,7 @@ public abstract class BaseBackActivity extends BaseActivity {
protected AppBarLayout abl;
protected FrameLayout flActivityContainer;
@SuppressLint("ResourceType")
@Override
protected void setBaseView(@LayoutRes int layoutId) {
Slidr.attach(this);
......@@ -40,7 +42,9 @@ public abstract class BaseBackActivity extends BaseActivity {
abl = findViewById(R.id.abl);
mToolbar = findViewById(R.id.toolbar);
flActivityContainer = findViewById(R.id.activity_container);
flActivityContainer.addView(LayoutInflater.from(this).inflate(layoutId, flActivityContainer, false));
if (layoutId > 0) {
flActivityContainer.addView(LayoutInflater.from(this).inflate(layoutId, flActivityContainer, false));
}
setSupportActionBar(mToolbar);
getToolBar().setDisplayHomeAsUpEnabled(true);
......
......@@ -44,8 +44,8 @@ ext {
min_sdk_version = 14
target_sdk_version = 27
version_code = 1_014_001
version_name = '1.14.1'// E.g 1.9.72 => 1,009,072
version_code = 1_014_002
version_name = '1.14.2'// E.g 1.9.72 => 1,009,072
// App dependencies
support_version = '27.1.0'
......
* 18/05/02 修复 PermissionUtils 空异常,发布 1.14.2 版本
* 18/04/28 新增 FlashlightUtils,发布 1.14.1 版本
* 18/04/26 修复 KeyboardUtils 全屏 NO_LIMIT 的 bug
* 18/04/25 修复多个空异常
......
......@@ -2,7 +2,7 @@
Gradle:
```groovy
implementation 'com.blankj:utilcode:1.14.1'
implementation 'com.blankj:utilcode:1.14.2'
```
......
......@@ -2,7 +2,7 @@
Gradle:
```groovy
implementation 'com.blankj:utilcode:1.14.1'
implementation 'com.blankj:utilcode:1.14.2'
```
......
......@@ -41,7 +41,12 @@ public final class KeyboardUtils {
(InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE);
if (imm == null) return;
View view = activity.getCurrentFocus();
if (view == null) view = new View(activity);
if (view == null) {
view = new View(activity);
view.setFocusable(true);
view.setFocusableInTouchMode(true);
view.requestFocus();
}
imm.showSoftInput(view, InputMethodManager.SHOW_FORCED);
}
......
......@@ -11,6 +11,7 @@ import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.RequiresApi;
import android.support.v4.content.ContextCompat;
import android.util.Log;
import com.blankj.utilcode.constant.PermissionConstants;
import com.blankj.utilcode.util.PermissionUtils.OnRationaleListener.ShouldRequest;
......@@ -287,6 +288,11 @@ public final class PermissionUtils {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
if (sInstance == null) {
Log.e("PermissionUtils", "request permissions failed");
finish();
return;
}
if (sInstance.mThemeCallback != null) {
sInstance.mThemeCallback.onActivityCreate(this);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册