Browse Source

0.0.41.beta7

kongzue 3 years ago
parent
commit
0b4817eb65

+ 0 - 3
DialogX/build.gradle

@@ -1,5 +1,4 @@
 apply plugin: 'com.android.library'
-apply plugin: 'android-maven'
 
 group = "com.kongzue.dialogx"
 version = BUILD_VERSION
@@ -10,8 +9,6 @@ android {
     defaultConfig {
         minSdkVersion 21
         targetSdkVersion 30
-        versionCode BUILD_VERSION_INT as int
-        versionName BUILD_VERSION
 
         consumerProguardFiles "consumer-rules.pro"
     }

+ 8 - 0
DialogX/src/main/java/com/kongzue/dialogx/interfaces/BaseDialog.java

@@ -397,11 +397,19 @@ public abstract class BaseDialog {
             init(null);
             if (getContext() == null) {
                 error("DialogX 未初始化。\n请检查是否在启动对话框前进行初始化操作,使用以下代码进行初始化:\nDialogX.init(context);\n\n另外建议您前往查看 DialogX 的文档进行使用:https://github.com/kongzue/DialogX");
+                return;
             }
         }
         if (style.styleVer != DialogXStyle.styleVer) {
             error("DialogX 所引用的 Style 不符合当前适用版本:" + DialogXStyle.styleVer + " 引入的 Style(" + style.getClass().getSimpleName() + ") 版本" + style.styleVer);
         }
+    
+        //Hide IME
+        View view = ((Activity)BaseDialog.getContext()).getCurrentFocus();
+        if (view != null) {
+            InputMethodManager imm = (InputMethodManager) BaseDialog.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
+            imm.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
+        }
     }
     
     protected String getString(int titleResId) {

+ 0 - 3
DialogXIOSStyle/build.gradle

@@ -1,5 +1,4 @@
 apply plugin: 'com.android.library'
-apply plugin: 'android-maven'
 
 def siteUrl = 'https://github.com/kongzue/DialogX' //项目在github主页地址
 def gitUrl = 'https://github.com/kongzue/DialogX.git'   //Git仓库的地址
@@ -13,8 +12,6 @@ android {
     defaultConfig {
         minSdkVersion 21
         targetSdkVersion 30
-        versionCode BUILD_VERSION_INT as int
-        versionName BUILD_VERSION
     }
 
     buildTypes {

+ 0 - 3
DialogXKongzueStyle/build.gradle

@@ -1,5 +1,4 @@
 apply plugin: 'com.android.library'
-apply plugin: 'android-maven'
 
 def siteUrl = 'https://github.com/kongzue/DialogX' //项目在github主页地址
 def gitUrl = 'https://github.com/kongzue/DialogX.git'   //Git仓库的地址
@@ -13,8 +12,6 @@ android {
     defaultConfig {
         minSdkVersion 21
         targetSdkVersion 30
-        versionCode BUILD_VERSION_INT as int
-        versionName BUILD_VERSION
     }
 
     buildTypes {

+ 0 - 3
DialogXMIUIStyle/build.gradle

@@ -1,5 +1,4 @@
 apply plugin: 'com.android.library'
-apply plugin: 'android-maven'
 
 def siteUrl = 'https://github.com/kongzue/DialogX' //项目在github主页地址
 def gitUrl = 'https://github.com/kongzue/DialogX.git'   //Git仓库的地址
@@ -13,8 +12,6 @@ android {
     defaultConfig {
         minSdkVersion 21
         targetSdkVersion 30
-        versionCode BUILD_VERSION_INT as int
-        versionName BUILD_VERSION
 
     }
 

+ 1 - 1
app/src/main/java/com/kongzue/dialogxdemo/App.java

@@ -26,7 +26,7 @@ public class App extends BaseApp<App> {
     @Override
     public void init() {
         DialogX.init(this);
-        DialogX.implIMPLMode= DialogX.IMPL_MODE.DIALOG_FRAGMENT;
+        DialogX.implIMPLMode= DialogX.IMPL_MODE.VIEW;
         DialogX.useHaptic = true;
         DialogX.globalStyle = new MaterialStyle() {
             @Override

+ 1 - 1
build.gradle

@@ -8,7 +8,7 @@ buildscript {
         }
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:4.2.2'
+        classpath 'com.android.tools.build:gradle:7.0.0'
         classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
 
         // NOTE: Do not place your application dependencies here; they belong

+ 1 - 1
gradle.properties

@@ -18,5 +18,5 @@ android.useAndroidX=true
 # Automatically convert third-party libraries to use AndroidX
 android.enableJetifier=true
 
-BUILD_VERSION=0.0.41.beta6
+BUILD_VERSION=0.0.41.beta7
 BUILD_VERSION_INT=40

+ 1 - 1
gradle/wrapper/gradle-wrapper.properties

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip