浏览代码

0.0.48.beta10

kongzue 2 年之前
父节点
当前提交
f4c979fa99
共有 1 个文件被更改,包括 162 次插入139 次删除
  1. 162 139
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/WaitDialog.java

+ 162 - 139
DialogX/src/main/java/com/kongzue/dialogx/dialogs/WaitDialog.java

@@ -41,6 +41,8 @@ import com.kongzue.dialogx.util.views.MaxRelativeLayout;
 import com.kongzue.dialogx.util.views.ProgressView;
 
 import java.lang.ref.WeakReference;
+import java.util.Timer;
+import java.util.TimerTask;
 
 /**
  * @author: Kongzue
@@ -50,7 +52,7 @@ import java.lang.ref.WeakReference;
  * @createTime: 2020/9/27 14:50
  */
 public class WaitDialog extends BaseDialog {
-
+    
     public static int overrideEnterDuration = -1;
     public static int overrideExitDuration = -1;
     public static int overrideEnterAnimRes = 0;
@@ -63,7 +65,7 @@ public class WaitDialog extends BaseDialog {
     protected float backgroundRadius = -1;
     protected DialogXAnimInterface<WaitDialog> dialogXAnimImpl;
     protected OnBackPressedListener<WaitDialog> onBackPressedListener;
-
+    
     public enum TYPE {
         /**
          * @deprecated NONE 和 PROGRESSING 不建议使用,禁止使用此方法。
@@ -80,7 +82,7 @@ public class WaitDialog extends BaseDialog {
         @Deprecated
         PROGRESSING
     }
-
+    
     protected static WeakReference<WaitDialog> me;
     protected CharSequence message;
     protected long tipShowDuration = 1500;
@@ -89,24 +91,24 @@ public class WaitDialog extends BaseDialog {
     protected TextInfo messageTextInfo;
     protected int maskColor = -1;
     protected BOOLEAN privateCancelable;
-
+    
     protected DialogLifecycleCallback<WaitDialog> dialogLifecycleCallback;
     protected OnBackgroundMaskClickListener<WaitDialog> onBackgroundMaskClickListener;
-
+    
     protected WaitDialog() {
         super();
         cancelable = DialogX.cancelableTipDialog;
     }
-
+    
     protected static WaitDialog instanceBuild() {
         me = new WeakReference<>(new WaitDialog());
         return me.get();
     }
-
+    
     public static WaitDialog build() {
         return new WaitDialog();
     }
-
+    
     public static WaitDialog show(CharSequence message) {
         boolean noInstance = noInstance();
         if (noInstance) instanceBuild();
@@ -114,7 +116,7 @@ public class WaitDialog extends BaseDialog {
         showWithInstance(noInstance);
         return me();
     }
-
+    
     public static WaitDialog show(Activity activity, CharSequence message) {
         boolean noInstance = noInstance(activity);
         if (noInstance) instanceBuild();
@@ -123,7 +125,7 @@ public class WaitDialog extends BaseDialog {
         if (noInstance) showWithInstance(instance, activity);
         return instance;
     }
-
+    
     public static WaitDialog show(int messageResId) {
         boolean noInstance = noInstance();
         if (noInstance) instanceBuild();
@@ -131,7 +133,7 @@ public class WaitDialog extends BaseDialog {
         showWithInstance(noInstance);
         return me();
     }
-
+    
     public static WaitDialog show(Activity activity, int messageResId) {
         boolean noInstance = noInstance(activity);
         if (noInstance) instanceBuild();
@@ -140,7 +142,7 @@ public class WaitDialog extends BaseDialog {
         if (noInstance) showWithInstance(instance, activity);
         return instance;
     }
-
+    
     public static WaitDialog show(CharSequence message, float progress) {
         boolean noInstance = noInstance();
         if (noInstance) instanceBuild();
@@ -149,7 +151,7 @@ public class WaitDialog extends BaseDialog {
         showWithInstance(noInstance);
         return me();
     }
-
+    
     public static WaitDialog show(Activity activity, CharSequence message, float progress) {
         boolean noInstance = noInstance(activity);
         if (noInstance) instanceBuild();
@@ -159,7 +161,7 @@ public class WaitDialog extends BaseDialog {
         if (noInstance) showWithInstance(instance, activity);
         return instance;
     }
-
+    
     public static WaitDialog show(int messageResId, float progress) {
         boolean noInstance = noInstance();
         if (noInstance) instanceBuild();
@@ -168,7 +170,7 @@ public class WaitDialog extends BaseDialog {
         showWithInstance(noInstance);
         return me();
     }
-
+    
     public static WaitDialog show(Activity activity, int messageResId, float progress) {
         boolean noInstance = noInstance(activity);
         if (noInstance) instanceBuild();
@@ -178,7 +180,7 @@ public class WaitDialog extends BaseDialog {
         if (noInstance) showWithInstance(instance, activity);
         return instance;
     }
-
+    
     public static WaitDialog show(Activity activity, float progress) {
         boolean noInstance = noInstance(activity);
         if (noInstance) instanceBuild();
@@ -188,7 +190,7 @@ public class WaitDialog extends BaseDialog {
         if (noInstance) showWithInstance(instance, activity);
         return instance;
     }
-
+    
     public static WaitDialog show(float progress) {
         boolean noInstance = noInstance();
         if (noInstance) instanceBuild();
@@ -197,28 +199,28 @@ public class WaitDialog extends BaseDialog {
         showWithInstance(noInstance);
         return me();
     }
-
+    
     public float getProgress() {
         return waitProgress;
     }
-
+    
     public WaitDialog setProgress(float waitProgress) {
         this.waitProgress = waitProgress;
         refreshUI();
         return this;
     }
-
+    
     private WeakReference<View> dialogView;
-
+    
     protected View getWaitDialogView() {
         if (dialogView == null) return null;
         return dialogView.get();
     }
-
+    
     protected void setWaitDialogView(View v) {
         dialogView = new WeakReference<>(v);
     }
-
+    
     public WaitDialog show() {
         super.beforeShow();
         runOnMain(new Runnable() {
@@ -240,7 +242,7 @@ public class WaitDialog extends BaseDialog {
         });
         return this;
     }
-
+    
     public WaitDialog show(final Activity activity) {
         super.beforeShow();
         activity.runOnUiThread(new Runnable() {
@@ -262,9 +264,9 @@ public class WaitDialog extends BaseDialog {
         });
         return this;
     }
-
+    
     protected WeakReference<DialogImpl> dialogImpl;
-
+    
     public class DialogImpl implements DialogConvertViewInterface {
         public DialogXBaseRelativeLayout boxRoot;
         public MaxRelativeLayout bkg;
@@ -273,13 +275,13 @@ public class WaitDialog extends BaseDialog {
         public ProgressViewInterface progressView;
         public RelativeLayout boxCustomView;
         public TextView txtInfo;
-
+        
         private int layoutResId;
-
+        
         public DialogImpl(int layoutResId) {
             this.layoutResId = layoutResId;
         }
-
+        
         public void lazyCreate() {
             View dialogView = createView(layoutResId);
             if (dialogView == null) return;
@@ -300,7 +302,7 @@ public class WaitDialog extends BaseDialog {
             setDialogImpl(this);
             refreshView();
         }
-
+        
         public DialogImpl(View convertView) {
             if (convertView == null) return;
             boxRoot = convertView.findViewById(R.id.box_root);
@@ -319,18 +321,18 @@ public class WaitDialog extends BaseDialog {
             setDialogImpl(this);
             refreshView();
         }
-
+        
         public void init() {
             if (messageTextInfo == null) messageTextInfo = DialogX.tipTextInfo;
             if (backgroundColor == -1) backgroundColor = DialogX.tipBackgroundColor;
-
+            
             if (style.overrideWaitTipRes() == null) {
                 blurView.setRadiusPx(dip2px(15));
             } else {
                 blurView.setRadiusPx(style.overrideWaitTipRes().overrideRadiusPx() < 0 ? dip2px(15) : style.overrideWaitTipRes().overrideRadiusPx());
             }
             boxRoot.setClickable(true);
-
+            
             boxRoot.setParentDialog(me());
             boxRoot.setOnLifecycleCallBack(new DialogXBaseRelativeLayout.OnLifecycleCallBack() {
                 @Override
@@ -343,23 +345,23 @@ public class WaitDialog extends BaseDialog {
                         @Override
                         public void run() {
                             if (getTopActivity() == null) return;
-
+                            
                             getDialogXAnimImpl().doShowAnim(WaitDialog.this, new ObjectRunnable<Float>() {
                                 @Override
                                 public void run(Float value) {
                                     boxRoot.setBkgAlpha(value);
                                 }
                             });
-
+                            
                             onDialogShow();
                             getDialogLifecycleCallback().onShow(WaitDialog.this);
                             WaitDialog.this.onShow(WaitDialog.this);
-
+                            
                             lifecycle.setCurrentState(Lifecycle.State.RESUMED);
                         }
                     });
                 }
-
+                
                 @Override
                 public void onDismiss() {
                     isShow = false;
@@ -376,7 +378,7 @@ public class WaitDialog extends BaseDialog {
                     System.gc();
                 }
             });
-
+            
             if (readyTipType != null) {
                 progressView.noLoading();
                 ((View) progressView).postDelayed(new Runnable() {
@@ -386,7 +388,7 @@ public class WaitDialog extends BaseDialog {
                     }
                 }, 100);
             }
-
+            
             boxRoot.setOnBackPressedListener(new DialogXBaseRelativeLayout.PrivateBackPressedListener() {
                 @Override
                 public boolean onBackPressed() {
@@ -404,20 +406,20 @@ public class WaitDialog extends BaseDialog {
             });
             onDialogInit();
         }
-
+        
         private float oldProgress;
-
+        
         public void refreshView() {
             if (boxRoot == null || getTopActivity() == null) {
                 return;
             }
             boxRoot.setRootPadding(screenPaddings[0], screenPaddings[1], screenPaddings[2], screenPaddings[3]);
-
+            
             bkg.setMaxWidth(getMaxWidth());
             bkg.setMaxHeight(getMaxHeight());
             bkg.setMinimumWidth(getMinWidth());
             bkg.setMinimumHeight(getMinHeight());
-
+            
             if (style.overrideWaitTipRes() != null) {
                 int overrideBackgroundColorRes = style.overrideWaitTipRes().overrideBackgroundColorRes(isLightTheme());
                 if (overrideBackgroundColorRes == 0) {
@@ -452,7 +454,7 @@ public class WaitDialog extends BaseDialog {
                 }
             }
             if (DialogX.tipProgressColor != -1) progressView.setColor(DialogX.tipProgressColor);
-
+            
             if (waitProgress >= 0 && waitProgress <= 1 && oldProgress != waitProgress) {
                 progressView.progress(waitProgress);
                 oldProgress = waitProgress;
@@ -471,14 +473,14 @@ public class WaitDialog extends BaseDialog {
                     bkg.setClipToOutline(true);
                 }
             }
-
+            
             showText(txtInfo, message);
             useTextInfo(txtInfo, messageTextInfo);
-
+            
             if (maskColor != -1) {
                 boxRoot.setBackgroundColor(maskColor);
             }
-
+            
             if (onBindView != null && onBindView.getCustomView() != null) {
                 onBindView.bindParent(boxCustomView, WaitDialog.this);
                 boxCustomView.setVisibility(View.VISIBLE);
@@ -487,7 +489,7 @@ public class WaitDialog extends BaseDialog {
                 boxCustomView.setVisibility(View.GONE);
                 boxProgress.setVisibility(View.VISIBLE);
             }
-
+            
             if (bkgInterceptTouch) {
                 if (isCancelable()) {
                     boxRoot.setOnClickListener(new View.OnClickListener() {
@@ -506,11 +508,11 @@ public class WaitDialog extends BaseDialog {
             }
             onDialogRefreshUI();
         }
-
+        
         public void doDismiss(final View v) {
             if (boxRoot == null) return;
             if (getTopActivity() == null) return;
-
+            
             if (!dismissAnimFlag) {
                 dismissAnimFlag = true;
                 boxRoot.post(new Runnable() {
@@ -535,7 +537,7 @@ public class WaitDialog extends BaseDialog {
                 });
             }
         }
-
+        
         protected DialogXAnimInterface<WaitDialog> getDialogXAnimImpl() {
             if (dialogXAnimImpl == null) {
                 dialogXAnimImpl = new DialogXAnimInterface<WaitDialog>() {
@@ -559,7 +561,7 @@ public class WaitDialog extends BaseDialog {
                         }
                         enterAnim.setDuration(enterAnimDurationTemp);
                         bkg.startAnimation(enterAnim);
-
+                        
                         ValueAnimator bkgAlpha = ValueAnimator.ofFloat(0f, 1f);
                         bkgAlpha.setDuration(enterAnimDurationTemp);
                         bkgAlpha.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@@ -569,20 +571,20 @@ public class WaitDialog extends BaseDialog {
                             }
                         });
                         bkgAlpha.start();
-
+                        
                         boxRoot.animate()
                                 .setDuration(enterAnimDurationTemp)
                                 .alpha(1f)
                                 .setInterpolator(new DecelerateInterpolator())
                                 .setListener(null);
                     }
-
+                    
                     @Override
                     public void doExitAnim(WaitDialog dialog, ObjectRunnable<Float> animProgress) {
                         Context context = getTopActivity();
                         if (context == null) context = boxRoot.getContext();
                         if (context == null) return;
-
+                        
                         int exitAnimResId = R.anim.anim_dialogx_default_exit;
                         if (overrideExitAnimRes != 0) {
                             exitAnimResId = overrideExitAnimRes;
@@ -601,12 +603,12 @@ public class WaitDialog extends BaseDialog {
                         exitAnim.setDuration(exitAnimDurationTemp);
                         exitAnim.setInterpolator(new AccelerateInterpolator());
                         bkg.startAnimation(exitAnim);
-
+                        
                         boxRoot.animate()
                                 .alpha(0f)
                                 .setInterpolator(new AccelerateInterpolator())
                                 .setDuration(exitAnimDurationTemp);
-
+                        
                         ValueAnimator bkgAlpha = ValueAnimator.ofFloat(1f, 0f);
                         bkgAlpha.setDuration(exitAnimDurationTemp);
                         bkgAlpha.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@@ -621,7 +623,7 @@ public class WaitDialog extends BaseDialog {
             }
             return dialogXAnimImpl;
         }
-
+        
         public void showTip(final TYPE tip) {
             runOnMain(new Runnable() {
                 @Override
@@ -642,7 +644,7 @@ public class WaitDialog extends BaseDialog {
                             progressView.error();
                             break;
                     }
-
+                    
                     if (boxProgress != null && boxProgress.getVisibility() == View.VISIBLE) {
                         //此事件是在完成衔接动画绘制后执行的逻辑
                         progressView.whenShowTick(new Runnable() {
@@ -680,16 +682,16 @@ public class WaitDialog extends BaseDialog {
             });
         }
     }
-
+    
     private void setDialogImpl(DialogImpl d) {
         if (dialogImpl != null && dialogImpl.get() != d) dialogImpl = new WeakReference<>(d);
     }
-
+    
     @Override
     public String dialogKey() {
         return getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")";
     }
-
+    
     @Override
     public boolean isLightTheme() {
         if (DialogX.tipTheme == null) {
@@ -698,7 +700,7 @@ public class WaitDialog extends BaseDialog {
             return DialogX.tipTheme == DialogX.THEME.LIGHT;
         }
     }
-
+    
     public void refreshUI() {
         if (getDialogImpl() == null) return;
         runOnMain(new Runnable() {
@@ -708,7 +710,7 @@ public class WaitDialog extends BaseDialog {
             }
         });
     }
-
+    
     public void doDismiss() {
         isShow = false;
         runOnMain(new Runnable() {
@@ -720,16 +722,31 @@ public class WaitDialog extends BaseDialog {
             }
         });
     }
-
+    
     public static void dismiss() {
         me().doDismiss();
     }
-
+    
     public static void dismiss(Activity activity) {
         WaitDialog instance = getInstance(activity);
         if (instance != null) instance.doDismiss();
     }
-
+    
+    protected static Timer delayDismissTimer;
+    
+    public static void dismiss(long delayTime) {
+        if (delayDismissTimer != null) {
+            delayDismissTimer.cancel();
+        }
+        delayDismissTimer = new Timer();
+        delayDismissTimer.schedule(new TimerTask() {
+            @Override
+            public void run() {
+                dismiss();
+            }
+        }, delayTime);
+    }
+    
     protected static WaitDialog me() {
         for (BaseDialog baseDialog : getRunningDialogList()) {
             if (baseDialog instanceof WaitDialog) {
@@ -743,37 +760,37 @@ public class WaitDialog extends BaseDialog {
         }
         return me.get();
     }
-
+    
     protected TYPE readyTipType;
-
+    
     protected void showTip(CharSequence message, TYPE type) {
         showType = type.ordinal();
         this.message = message;
         readyTipType = type;
         show();
     }
-
+    
     protected void showTip(Activity activity, CharSequence message, TYPE type) {
         showType = type.ordinal();
         this.message = message;
         readyTipType = type;
         show(activity);
     }
-
+    
     protected void showTip(int messageResId, TYPE type) {
         showType = type.ordinal();
         this.message = getString(messageResId);
         readyTipType = type;
         show();
     }
-
+    
     protected void showTip(Activity activity, int messageResId, TYPE type) {
         showType = type.ordinal();
         this.message = getString(messageResId);
         readyTipType = type;
         show(activity);
     }
-
+    
     protected void showTip(TYPE type) {
         if (readyTipType == type) {
             return;
@@ -784,44 +801,44 @@ public class WaitDialog extends BaseDialog {
             getDialogImpl().showTip(type);
         }
     }
-
+    
     protected void setTip(TYPE type) {
         showTip(type);
     }
-
+    
     protected void setTip(CharSequence message, TYPE type) {
         this.message = message;
         showTip(type);
         refreshUI();
     }
-
+    
     protected void setTip(int messageResId, TYPE type) {
         this.message = getString(messageResId);
         showTip(type);
         refreshUI();
     }
-
+    
     protected void setTipShowDuration(long tipShowDuration) {
         this.tipShowDuration = tipShowDuration;
         showTip(readyTipType);
     }
-
+    
     public static CharSequence getMessage() {
         return me().message;
     }
-
+    
     public static WaitDialog setMessage(CharSequence message) {
         me().preMessage(message);
         me().refreshUI();
         return me();
     }
-
+    
     public static WaitDialog setMessage(int messageResId) {
         me().preMessage(messageResId);
         me().refreshUI();
         return me();
     }
-
+    
     public boolean isCancelable() {
         if (privateCancelable != null) {
             return privateCancelable == BOOLEAN.TRUE;
@@ -831,13 +848,13 @@ public class WaitDialog extends BaseDialog {
         }
         return DialogX.cancelableTipDialog;
     }
-
+    
     public WaitDialog setCancelable(boolean cancelable) {
         privateCancelable = cancelable ? BOOLEAN.TRUE : BOOLEAN.FALSE;
         refreshUI();
         return this;
     }
-
+    
     /**
      * 用于从 WaitDialog 到 TipDialog 的消息设置
      * 此方法不会立即执行,而是等到动画衔接完成后由事件设置
@@ -849,100 +866,100 @@ public class WaitDialog extends BaseDialog {
         this.message = message;
         return this;
     }
-
+    
     protected WaitDialog preMessage(int messageResId) {
         this.message = getString(messageResId);
         return this;
     }
-
+    
     public DialogLifecycleCallback<WaitDialog> getDialogLifecycleCallback() {
         return dialogLifecycleCallback == null ? new DialogLifecycleCallback<WaitDialog>() {
         } : dialogLifecycleCallback;
     }
-
+    
     public WaitDialog setDialogLifecycleCallback(DialogLifecycleCallback<WaitDialog> dialogLifecycleCallback) {
         this.dialogLifecycleCallback = dialogLifecycleCallback;
         if (isShow) dialogLifecycleCallback.onShow(me());
         return this;
     }
-
+    
     public DialogImpl getDialogImpl() {
         if (dialogImpl == null) return null;
         return dialogImpl.get();
     }
-
+    
     public WaitDialog setCustomView(OnBindView<WaitDialog> onBindView) {
         this.onBindView = onBindView;
         refreshUI();
         return this;
     }
-
+    
     public View getCustomView() {
         if (onBindView == null) return null;
         return onBindView.getCustomView();
     }
-
+    
     public WaitDialog removeCustomView() {
         this.onBindView.clean();
         refreshUI();
         return this;
     }
-
+    
     public OnBackPressedListener<WaitDialog> getOnBackPressedListener() {
         return (OnBackPressedListener<WaitDialog>) onBackPressedListener;
     }
-
+    
     public WaitDialog setOnBackPressedListener(OnBackPressedListener<WaitDialog> onBackPressedListener) {
         this.onBackPressedListener = onBackPressedListener;
         refreshUI();
         return this;
     }
-
+    
     public int getBackgroundColor() {
         return backgroundColor;
     }
-
+    
     public WaitDialog setBackgroundColor(@ColorInt int backgroundColor) {
         this.backgroundColor = backgroundColor;
         refreshUI();
         return this;
     }
-
+    
     public WaitDialog setBackgroundColorRes(@ColorRes int backgroundColorResId) {
         this.backgroundColor = getColor(backgroundColorResId);
         refreshUI();
         return this;
     }
-
+    
     public WaitDialog setMaskColor(@ColorInt int maskColor) {
         this.maskColor = maskColor;
         refreshUI();
         return this;
     }
-
+    
     public WaitDialog setEnterAnimDuration(long enterAnimDuration) {
         this.enterAnimDuration = enterAnimDuration;
         return this;
     }
-
+    
     public long getExitAnimDuration() {
         return exitAnimDuration;
     }
-
+    
     public WaitDialog setExitAnimDuration(long exitAnimDuration) {
         this.exitAnimDuration = exitAnimDuration;
         return this;
     }
-
+    
     @Override
     public void restartDialog() {
         refreshUI();
     }
-
+    
     public static WaitDialog getInstance() {
         return me();
     }
-
+    
     /**
      * 获取当前 WaitDialog 显示状态
      * <p>
@@ -958,37 +975,37 @@ public class WaitDialog extends BaseDialog {
     public static int getType() {
         return me().showType;
     }
-
+    
     public WaitDialog setAnimResId(int enterResId, int exitResId) {
         customEnterAnimResId = enterResId;
         customExitAnimResId = exitResId;
         return this;
     }
-
+    
     public WaitDialog setEnterAnimResId(int enterResId) {
         customEnterAnimResId = enterResId;
         return this;
     }
-
+    
     public WaitDialog setExitAnimResId(int exitResId) {
         customExitAnimResId = exitResId;
         return this;
     }
-
+    
     protected static boolean noInstance() {
         if (getTopActivity() != null && getInstance((Activity) getTopActivity()) != null) {
             return false;
         }
         return me == null || me.get() == null || me.get().getOwnActivity() == null || me.get().getOwnActivity() != getTopActivity() || !me.get().isShow;
     }
-
+    
     protected static boolean noInstance(Activity activity) {
         if (getTopActivity() != null && getInstance(activity) != null) {
             return false;
         }
         return me == null || me.get() == null || me.get().getOwnActivity() == null || me.get().getOwnActivity() != activity || !me.get().isShow;
     }
-
+    
     public static WaitDialog getInstanceNotNull(Activity activity) {
         for (BaseDialog baseDialog : getRunningDialogList()) {
             if (baseDialog instanceof WaitDialog) {
@@ -999,7 +1016,7 @@ public class WaitDialog extends BaseDialog {
         }
         return instanceBuild();
     }
-
+    
     public static WaitDialog getInstance(Activity activity) {
         for (BaseDialog baseDialog : getRunningDialogList()) {
             if (baseDialog instanceof WaitDialog) {
@@ -1010,147 +1027,153 @@ public class WaitDialog extends BaseDialog {
         }
         return null;
     }
-
+    
     protected static void showWithInstance(boolean noInstance) {
+        if (delayDismissTimer != null) {
+            delayDismissTimer.cancel();
+        }
         if (noInstance) {
             me().show();
         } else {
             me().refreshUI();
         }
     }
-
+    
     protected static void showWithInstance(WaitDialog instance, Activity activity) {
+        if (delayDismissTimer != null) {
+            delayDismissTimer.cancel();
+        }
         if (activity == null) {
             instance.show();
         } else {
             instance.show(activity);
         }
     }
-
+    
     @Override
     protected void shutdown() {
         dismiss();
     }
-
+    
     public WaitDialog setMaxWidth(int maxWidth) {
         this.maxWidth = maxWidth;
         refreshUI();
         return this;
     }
-
+    
     public WaitDialog setMaxHeight(int maxHeight) {
         this.maxHeight = maxHeight;
         refreshUI();
         return this;
     }
-
+    
     public WaitDialog setMinHeight(int minHeight) {
         this.minHeight = minHeight;
         refreshUI();
         return this;
     }
-
+    
     public WaitDialog setMinWidth(int minWidth) {
         this.minWidth = minWidth;
         refreshUI();
         return this;
     }
-
+    
     public WaitDialog setDialogImplMode(DialogX.IMPL_MODE dialogImplMode) {
         this.dialogImplMode = dialogImplMode;
         return this;
     }
-
+    
     public boolean isBkgInterceptTouch() {
         return bkgInterceptTouch;
     }
-
+    
     public WaitDialog setBkgInterceptTouch(boolean bkgInterceptTouch) {
         this.bkgInterceptTouch = bkgInterceptTouch;
         return this;
     }
-
+    
     public OnBackgroundMaskClickListener<WaitDialog> getOnBackgroundMaskClickListener() {
         return onBackgroundMaskClickListener;
     }
-
+    
     public WaitDialog setOnBackgroundMaskClickListener(OnBackgroundMaskClickListener<WaitDialog> onBackgroundMaskClickListener) {
         this.onBackgroundMaskClickListener = onBackgroundMaskClickListener;
         return this;
     }
-
+    
     public WaitDialog setStyle(DialogXStyle style) {
         this.style = style;
         return this;
     }
-
+    
     public WaitDialog setTheme(DialogX.THEME theme) {
         this.theme = theme;
         return this;
     }
-
+    
     public TextInfo getMessageTextInfo() {
         return messageTextInfo;
     }
-
+    
     public WaitDialog setMessageTextInfo(TextInfo messageTextInfo) {
         this.messageTextInfo = messageTextInfo;
         refreshUI();
         return this;
     }
-
+    
     public WaitDialog setMessageContent(CharSequence message) {
         this.message = message;
         refreshUI();
         return this;
     }
-
+    
     public WaitDialog setMessageContent(int messageResId) {
         this.message = getString(messageResId);
         refreshUI();
         return this;
     }
-
+    
     public CharSequence getMessageContent() {
         return message;
     }
-
+    
     public WaitDialog setTipType(TYPE type) {
         showTip(type);
         return this;
     }
-
+    
     public WaitDialog setRadius(float radiusPx) {
         backgroundRadius = radiusPx;
         refreshUI();
         return this;
     }
-
+    
     public float getRadius() {
         return backgroundRadius;
     }
-
+    
     public DialogXAnimInterface<WaitDialog> getDialogXAnimImpl() {
         return dialogXAnimImpl;
     }
-
+    
     public WaitDialog setDialogXAnimImpl(DialogXAnimInterface<WaitDialog> dialogXAnimImpl) {
         this.dialogXAnimImpl = dialogXAnimImpl;
         return this;
     }
-
+    
     public WaitDialog setRootPadding(int padding) {
         this.screenPaddings = new int[]{padding, padding, padding, padding};
         refreshUI();
         return this;
     }
-
+    
     public WaitDialog setRootPadding(int paddingLeft, int paddingTop, int paddingRight, int paddingBottom) {
         this.screenPaddings = new int[]{paddingLeft, paddingTop, paddingRight, paddingBottom};
         refreshUI();
         return this;
     }
-
+    
     /**
      * 用于使用 new 构建实例时,override 的生命周期事件
      * 例如:
@@ -1163,9 +1186,9 @@ public class WaitDialog extends BaseDialog {
      * }
      */
     public void onShow(WaitDialog dialog) {
-
+    
     }
-
+    
     /**
      * 用于使用 new 构建实例时,override 的生命周期事件
      * 例如:
@@ -1187,6 +1210,6 @@ public class WaitDialog extends BaseDialog {
      */
     //用于使用 new 构建实例时,override 的生命周期事件
     public void onDismiss(WaitDialog dialog) {
-
+    
     }
 }