瀏覽代碼

0.0.43.beta13

kongzue 3 年之前
父節點
當前提交
be408546d5

+ 6 - 0
DialogX/src/main/java/com/kongzue/dialogx/dialogs/TipDialog.java

@@ -15,6 +15,12 @@ import java.lang.ref.WeakReference;
  */
 public class TipDialog extends WaitDialog {
     
+    /**
+     * 参数 duration 使用此值,或小于 0 的任意整数时,
+     * TipDialog 将不自动关闭
+     */
+    public static final int NO_AUTO_DISMISS = -1;
+    
     protected TipDialog() {
         super();
     }

+ 9 - 7
DialogX/src/main/java/com/kongzue/dialogx/dialogs/WaitDialog.java

@@ -541,14 +541,16 @@ public class WaitDialog extends BaseDialog {
                         public void run() {
                             getDialogLifecycleCallback().onShow(WaitDialog.this);
                             refreshView();
-                            ((View) progressView).postDelayed(new Runnable() {
-                                @Override
-                                public void run() {
-                                    if (showType > -1) {
-                                        doDismiss(null);
+                            if (tipShowDuration > 0) {
+                                ((View) progressView).postDelayed(new Runnable() {
+                                    @Override
+                                    public void run() {
+                                        if (showType > -1) {
+                                            doDismiss(null);
+                                        }
                                     }
-                                }
-                            }, tipShowDuration);
+                                }, tipShowDuration);
+                            }
                         }
                     });
                 }

+ 3 - 1
README.md

@@ -138,10 +138,12 @@ allprojects {
 }
 ```
 
+⚠️请注意,使用 Android Studio 北极狐版本(Arctic Fox)创建的项目,需要您前往 settings.gradle 添加上述 jitpack 仓库配置。
+
 2) 在 app 的 build.gradle 文件中找到 `dependencies{}` 代码块,并在其中加入以下语句:
 
 ```
-def dialogx_version = "0.0.43"
+def dialogx_version = "0.0.43.beta13"
 implementation "com.github.kongzue.DialogX:DialogX:${dialogx_version}"
 ```
 

+ 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.43.beta12
+BUILD_VERSION=0.0.43.beta13
 BUILD_VERSION_INT=42