Browse Source

update 0.0.16 ver.

kongzue 4 years ago
parent
commit
e5c998ac8c

+ 3 - 3
DialogX/build.gradle

@@ -6,7 +6,7 @@ def siteUrl = 'https://github.com/kongzue/DialogX' //项目在github主页地址
 def gitUrl = 'https://github.com/kongzue/DialogX.git'   //Git仓库的地址
 
 group = "com.kongzue.dialogx"
-version = "0.0.15"
+version = "0.0.16"
 
 android {
     compileSdkVersion 30
@@ -14,8 +14,8 @@ android {
     defaultConfig {
         minSdkVersion 21
         targetSdkVersion 30
-        versionCode 15
-        versionName "0.0.15"
+        versionCode 16
+        versionName "0.0.16"
 
         consumerProguardFiles "consumer-rules.pro"
 

+ 6 - 1
DialogX/src/main/java/com/kongzue/dialogx/interfaces/BaseDialog.java

@@ -61,6 +61,7 @@ public class BaseDialog {
     
     public static void show(final View view) {
         if (rootFrameLayout == null || view == null || rootFrameLayout.get() == null) return;
+        view.setTag(rootFrameLayout.get());
         rootFrameLayout.get().post(new Runnable() {
             @Override
             public void run() {
@@ -71,7 +72,11 @@ public class BaseDialog {
     
     public static void dismiss(View dialogView) {
         if (rootFrameLayout == null || dialogView == null) return;
-        rootFrameLayout.get().removeView(dialogView);
+        if (dialogView.getTag() == null || !(dialogView.getTag() instanceof ViewGroup)) {
+            rootFrameLayout.get().removeView(dialogView);
+        } else {
+            ((ViewGroup) dialogView.getTag()).removeView(dialogView);
+        }
     }
     
     public static Context getContext() {

+ 3 - 3
DialogXIOSStyle/build.gradle

@@ -6,7 +6,7 @@ def siteUrl = 'https://github.com/kongzue/DialogX' //项目在github主页地址
 def gitUrl = 'https://github.com/kongzue/DialogX.git'   //Git仓库的地址
 
 group = "com.kongzue.dialogx.style.ios"
-version = "0.0.14"
+version = "0.0.16"
 
 android {
     compileSdkVersion 30
@@ -14,8 +14,8 @@ android {
     defaultConfig {
         minSdkVersion 21
         targetSdkVersion 30
-        versionCode 1
-        versionName "1.0"
+        versionCode 16
+        versionName "0.0.16"
     }
 
     buildTypes {

+ 3 - 3
DialogXKongzueStyle/build.gradle

@@ -6,7 +6,7 @@ def siteUrl = 'https://github.com/kongzue/DialogX' //项目在github主页地址
 def gitUrl = 'https://github.com/kongzue/DialogX.git'   //Git仓库的地址
 
 group = "com.kongzue.dialogx.style.kongzue"
-version = "0.0.14"
+version = "0.0.16"
 
 android {
     compileSdkVersion 30
@@ -14,8 +14,8 @@ android {
     defaultConfig {
         minSdkVersion 21
         targetSdkVersion 30
-        versionCode 1
-        versionName "1.0"
+        versionCode 16
+        versionName "0.0.16"
     }
 
     buildTypes {

+ 3 - 3
DialogXMIUIStyle/build.gradle

@@ -6,7 +6,7 @@ def siteUrl = 'https://github.com/kongzue/DialogX' //项目在github主页地址
 def gitUrl = 'https://github.com/kongzue/DialogX.git'   //Git仓库的地址
 
 group = "com.kongzue.dialogx.style.miui"
-version = "0.0.14"
+version = "0.0.16"
 
 android {
     compileSdkVersion 30
@@ -14,8 +14,8 @@ android {
     defaultConfig {
         minSdkVersion 21
         targetSdkVersion 30
-        versionCode 1
-        versionName "1.0"
+        versionCode 16
+        versionName "0.0.16"
 
     }
 

+ 2 - 2
README.md

@@ -106,7 +106,7 @@ DialogX 采用了主体分离结构,主框架仅包含 Material 设计风格
 想要在您的项目引入 DialogX,您需要在 app 的 build.gradle 文件中找到 `dependencies{}` 代码块,并在其中加入以下语句:
 
 ```
-implementation 'com.kongzue.dialogx:DialogX:0.0.15'
+implementation 'com.kongzue.dialogx:DialogX:0.0.16'
 ```
 
 若有需要,也可以手动配置 Maven:
@@ -115,7 +115,7 @@ implementation 'com.kongzue.dialogx:DialogX:0.0.15'
 <dependency>
   <groupId>com.kongzue.dialogx</groupId>
   <artifactId>DialogX</artifactId>
-  <version>0.0.15</version>
+  <version>0.0.16</version>
   <type>pom</type>
 </dependency>
 ```