Browse Source

0.0.34 update

kongzue 4 years ago
parent
commit
e98eb6378f
21 changed files with 588 additions and 287 deletions
  1. 3 1
      DialogX/src/main/java/com/kongzue/dialogx/DialogX.java
  2. 8 11
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/BottomDialog.java
  3. 5 0
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/BottomMenu.java
  4. 8 6
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/CustomDialog.java
  5. 8 10
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/FullScreenDialog.java
  6. 6 1
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/InputDialog.java
  7. 15 4
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/MessageDialog.java
  8. 8 3
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/PopTip.java
  9. 5 0
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/TipDialog.java
  10. 12 16
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/WaitDialog.java
  11. 22 8
      DialogX/src/main/java/com/kongzue/dialogx/interfaces/BaseDialog.java
  12. 0 1
      DialogX/src/main/java/com/kongzue/dialogx/interfaces/DialogLifecycleCallback.java
  13. 8 0
      DialogX/src/main/java/com/kongzue/dialogx/interfaces/OnBindView.java
  14. 452 0
      DialogX/src/main/java/com/kongzue/dialogx/util/views/NoArticulatedProgressView.java
  15. 2 1
      DialogXIOSStyle/src/main/res/layout/layout_dialogx_ios.xml
  16. 2 1
      DialogXIOSStyle/src/main/res/layout/layout_dialogx_ios_dark.xml
  17. 3 3
      app/build.gradle
  18. 5 0
      app/src/main/java/com/kongzue/dialogxdemo/App.java
  19. 11 216
      app/src/main/java/com/kongzue/dialogxdemo/CustomStyle.java
  20. 3 3
      app/src/main/java/com/kongzue/dialogxdemo/MainActivity.java
  21. 2 2
      gradle.properties

+ 3 - 1
DialogX/src/main/java/com/kongzue/dialogx/DialogX.java

@@ -19,6 +19,8 @@ import com.kongzue.dialogx.util.TextInfo;
  */
 public class DialogX {
     
+    public static final String ERROR_INIT_TIPS = "DialogX.init: 初始化异常,context 为 null 或未初始化,详情请查看 https://github.com/kongzue/DialogX/wiki";
+    
     //开启日志
     public static boolean DEBUGMODE = true;
     
@@ -104,7 +106,7 @@ public class DialogX {
     
     public static void init(Context context) {
         if (context == null) {
-            error("DialogX.init: 初始化异常,context 为 null");
+            error(ERROR_INIT_TIPS);
             return;
         }
         BaseDialog.init(context);

+ 8 - 11
DialogX/src/main/java/com/kongzue/dialogx/dialogs/BottomDialog.java

@@ -4,7 +4,6 @@ import android.animation.Animator;
 import android.animation.ObjectAnimator;
 import android.app.Activity;
 import android.content.res.Configuration;
-import android.graphics.Color;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.ViewTreeObserver;
@@ -16,31 +15,24 @@ import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
 import android.widget.ScrollView;
-import android.widget.Space;
 import android.widget.TextView;
 
 import androidx.annotation.ColorInt;
 import androidx.annotation.ColorRes;
-import androidx.core.content.ContextCompat;
 
 import com.kongzue.dialogx.DialogX;
 import com.kongzue.dialogx.R;
 import com.kongzue.dialogx.impl.AnimatorListenerEndCallBack;
 import com.kongzue.dialogx.interfaces.BaseDialog;
-import com.kongzue.dialogx.interfaces.BaseOnDialogClickCallback;
 import com.kongzue.dialogx.interfaces.DialogConvertViewInterface;
 import com.kongzue.dialogx.interfaces.DialogLifecycleCallback;
 import com.kongzue.dialogx.interfaces.DialogXStyle;
 import com.kongzue.dialogx.interfaces.OnBackPressedListener;
 import com.kongzue.dialogx.interfaces.OnBindView;
 import com.kongzue.dialogx.interfaces.OnDialogButtonClickListener;
-import com.kongzue.dialogx.interfaces.OnInputDialogButtonClickListener;
-import com.kongzue.dialogx.interfaces.OnMenuItemClickListener;
-import com.kongzue.dialogx.style.MaterialStyle;
 import com.kongzue.dialogx.util.BottomDialogTouchEventInterceptor;
 import com.kongzue.dialogx.util.TextInfo;
 import com.kongzue.dialogx.util.views.BlurView;
-import com.kongzue.dialogx.util.views.BottomDialogScrollView;
 import com.kongzue.dialogx.util.views.DialogXBaseRelativeLayout;
 import com.kongzue.dialogx.util.views.MaxRelativeLayout;
 
@@ -87,6 +79,11 @@ public class BottomDialog extends BaseDialog {
         super();
     }
     
+    @Override
+    public String dialogKey() {
+        return getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")";
+    }
+    
     private View dialogView;
     
     public static BottomDialog build() {
@@ -180,7 +177,7 @@ public class BottomDialog extends BaseDialog {
         
         dialogView = createView(layoutId);
         dialogImpl = new DialogImpl(dialogView);
-        dialogView.setTag(getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")");
+        dialogView.setTag(dialogKey());
         show(dialogView);
     }
     
@@ -193,7 +190,7 @@ public class BottomDialog extends BaseDialog {
         
         dialogView = createView(layoutId);
         dialogImpl = new DialogImpl(dialogView);
-        dialogView.setTag(getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")");
+        dialogView.setTag(dialogKey());
         show(activity, dialogView);
     }
     
@@ -865,7 +862,7 @@ public class BottomDialog extends BaseDialog {
         enterAnimDuration = 0;
         dialogView = createView(layoutId);
         dialogImpl = new DialogImpl(dialogView);
-        dialogView.setTag(getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")");
+        dialogView.setTag(dialogKey());
         show(dialogView);
     }
 }

+ 5 - 0
DialogX/src/main/java/com/kongzue/dialogx/dialogs/BottomMenu.java

@@ -546,6 +546,11 @@ public class BottomMenu extends BottomDialog {
         }
     }
     
+    @Override
+    public String dialogKey() {
+        return getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")";
+    }
+    
     public List<CharSequence> getMenuList() {
         return menuList;
     }

+ 8 - 6
DialogX/src/main/java/com/kongzue/dialogx/dialogs/CustomDialog.java

@@ -1,12 +1,10 @@
 package com.kongzue.dialogx.dialogs;
 
-import android.animation.Animator;
 import android.app.Activity;
 import android.content.res.Configuration;
 import android.graphics.Color;
 import android.view.View;
 import android.view.ViewGroup;
-import android.view.animation.AccelerateInterpolator;
 import android.view.animation.Animation;
 import android.view.animation.AnimationUtils;
 import android.view.animation.DecelerateInterpolator;
@@ -16,7 +14,6 @@ import androidx.annotation.ColorInt;
 
 import com.kongzue.dialogx.DialogX;
 import com.kongzue.dialogx.R;
-import com.kongzue.dialogx.impl.AnimatorListenerEndCallBack;
 import com.kongzue.dialogx.interfaces.BaseDialog;
 import com.kongzue.dialogx.interfaces.DialogConvertViewInterface;
 import com.kongzue.dialogx.interfaces.DialogLifecycleCallback;
@@ -84,7 +81,7 @@ public class CustomDialog extends BaseDialog {
         super.beforeShow();
         dialogView = createView(R.layout.layout_dialogx_custom);
         dialogImpl = new DialogImpl(dialogView);
-        dialogView.setTag(getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")");
+        dialogView.setTag(dialogKey());
         show(dialogView);
     }
     
@@ -92,7 +89,7 @@ public class CustomDialog extends BaseDialog {
         super.beforeShow();
         dialogView = createView(R.layout.layout_dialogx_custom);
         dialogImpl = new DialogImpl(dialogView);
-        dialogView.setTag(getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")");
+        dialogView.setTag(dialogKey());
         show(activity, dialogView);
     }
     
@@ -266,6 +263,11 @@ public class CustomDialog extends BaseDialog {
         }
     }
     
+    @Override
+    public String dialogKey() {
+        return getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")";
+    }
+    
     public void refreshUI() {
         if (getRootFrameLayout() == null) return;
         getRootFrameLayout().post(new Runnable() {
@@ -433,7 +435,7 @@ public class CustomDialog extends BaseDialog {
         enterAnimDuration = 0;
         dialogView = createView(R.layout.layout_dialogx_custom);
         dialogImpl = new DialogImpl(dialogView);
-        dialogView.setTag(getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")");
+        dialogView.setTag(dialogKey());
         show(dialogView);
     }
 }

+ 8 - 10
DialogX/src/main/java/com/kongzue/dialogx/dialogs/FullScreenDialog.java

@@ -8,10 +8,7 @@ import android.graphics.Rect;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.animation.AccelerateInterpolator;
-import android.view.animation.Animation;
-import android.view.animation.AnimationUtils;
 import android.view.animation.DecelerateInterpolator;
-import android.widget.FrameLayout;
 import android.widget.RelativeLayout;
 
 import androidx.annotation.ColorInt;
@@ -26,13 +23,9 @@ import com.kongzue.dialogx.interfaces.DialogLifecycleCallback;
 import com.kongzue.dialogx.interfaces.DialogXStyle;
 import com.kongzue.dialogx.interfaces.OnBackPressedListener;
 import com.kongzue.dialogx.interfaces.OnBindView;
-import com.kongzue.dialogx.interfaces.OnDialogButtonClickListener;
 import com.kongzue.dialogx.interfaces.OnSafeInsetsChangeListener;
-import com.kongzue.dialogx.util.BottomDialogTouchEventInterceptor;
 import com.kongzue.dialogx.util.FullScreenDialogTouchEventInterceptor;
-import com.kongzue.dialogx.util.TextInfo;
 import com.kongzue.dialogx.util.views.ActivityScreenShotImageView;
-import com.kongzue.dialogx.util.views.BlurView;
 import com.kongzue.dialogx.util.views.DialogXBaseRelativeLayout;
 import com.kongzue.dialogx.util.views.MaxRelativeLayout;
 
@@ -77,7 +70,7 @@ public class FullScreenDialog extends BaseDialog {
         super.beforeShow();
         dialogView = createView(isLightTheme() ? R.layout.layout_dialogx_fullscreen : R.layout.layout_dialogx_fullscreen_dark);
         dialogImpl = new DialogImpl(dialogView);
-        dialogView.setTag(getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")");
+        dialogView.setTag(dialogKey());
         show(dialogView);
     }
     
@@ -85,7 +78,7 @@ public class FullScreenDialog extends BaseDialog {
         super.beforeShow();
         dialogView = createView(isLightTheme() ? R.layout.layout_dialogx_fullscreen : R.layout.layout_dialogx_fullscreen_dark);
         dialogImpl = new DialogImpl(dialogView);
-        dialogView.setTag(getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")");
+        dialogView.setTag(dialogKey());
         show(activity, dialogView);
     }
     
@@ -254,6 +247,11 @@ public class FullScreenDialog extends BaseDialog {
         }
     }
     
+    @Override
+    public String dialogKey() {
+        return getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")";
+    }
+    
     public void refreshUI() {
         if (getRootFrameLayout() == null) return;
         getRootFrameLayout().post(new Runnable() {
@@ -381,7 +379,7 @@ public class FullScreenDialog extends BaseDialog {
         enterAnimDuration = 0;
         dialogView = createView(isLightTheme() ? R.layout.layout_dialogx_fullscreen : R.layout.layout_dialogx_fullscreen_dark);
         dialogImpl = new DialogImpl(dialogView);
-        dialogView.setTag(getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")");
+        dialogView.setTag(dialogKey());
         show(dialogView);
     }
 }

+ 6 - 1
DialogX/src/main/java/com/kongzue/dialogx/dialogs/InputDialog.java

@@ -163,6 +163,11 @@ public class InputDialog extends MessageDialog {
         return inputDialog;
     }
     
+    @Override
+    public String dialogKey() {
+        return getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")";
+    }
+    
     public CharSequence getOkButton() {
         return okText;
     }
@@ -538,7 +543,7 @@ public class InputDialog extends MessageDialog {
         enterAnimDuration = 0;
         dialogView = createView(layoutId);
         dialogImpl = new DialogImpl(dialogView);
-        dialogView.setTag(getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")");
+        dialogView.setTag(dialogKey());
         show(dialogView);
         setInputText(inputText);
     }

+ 15 - 4
DialogX/src/main/java/com/kongzue/dialogx/dialogs/MessageDialog.java

@@ -198,7 +198,7 @@ public class MessageDialog extends BaseDialog {
         
         dialogView = createView(layoutId);
         dialogImpl = new DialogImpl(dialogView);
-        dialogView.setTag(getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")");
+        dialogView.setTag(dialogKey());
         show(dialogView);
     }
     
@@ -209,7 +209,7 @@ public class MessageDialog extends BaseDialog {
         
         dialogView = createView(layoutId);
         dialogImpl = new DialogImpl(dialogView);
-        dialogView.setTag(getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")");
+        dialogView.setTag(dialogKey());
         show(activity, dialogView);
     }
     
@@ -235,6 +235,7 @@ public class MessageDialog extends BaseDialog {
         public LinearLayout boxButton;
         public TextView btnSelectOther;
         public View spaceOtherButton;
+        public View splitHorizontal;
         public TextView btnSelectNegative;
         public TextView btnSelectPositive;
         
@@ -248,6 +249,7 @@ public class MessageDialog extends BaseDialog {
             boxButton = convertView.findViewById(R.id.box_button);
             btnSelectOther = convertView.findViewById(R.id.btn_selectOther);
             spaceOtherButton = convertView.findViewById(R.id.space_other_button);
+            splitHorizontal = convertView.findViewWithTag("split");
             btnSelectNegative = convertView.findViewById(R.id.btn_selectNegative);
             btnSelectPositive = convertView.findViewById(R.id.btn_selectPositive);
             init();
@@ -488,6 +490,10 @@ public class MessageDialog extends BaseDialog {
                 visibleButtonCount = visibleButtonCount + 1;
             }
             
+            if (splitHorizontal != null) {
+                splitHorizontal.setBackgroundColor(style.splitColorRes(isLightTheme()));
+            }
+            
             boxButton.setOrientation(buttonOrientation);
             if (buttonOrientation == LinearLayout.VERTICAL) {
                 //纵向
@@ -644,6 +650,11 @@ public class MessageDialog extends BaseDialog {
         }
     }
     
+    @Override
+    public String dialogKey() {
+        return getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")";
+    }
+    
     public void dismiss() {
         if (dialogImpl == null) return;
         dialogImpl.doDismiss(dialogImpl.bkg);
@@ -992,7 +1003,7 @@ public class MessageDialog extends BaseDialog {
         if (dialogView != null) {
             dismiss(dialogView);
         }
-        if (getDialogImpl().boxCustom!=null){
+        if (getDialogImpl().boxCustom != null) {
             getDialogImpl().boxCustom.removeAllViews();
         }
         int layoutId = style.layout(isLightTheme());
@@ -1001,7 +1012,7 @@ public class MessageDialog extends BaseDialog {
         enterAnimDuration = 0;
         dialogView = createView(layoutId);
         dialogImpl = new DialogImpl(dialogView);
-        dialogView.setTag(getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")");
+        dialogView.setTag(dialogKey());
         show(dialogView);
     }
 }

+ 8 - 3
DialogX/src/main/java/com/kongzue/dialogx/dialogs/PopTip.java

@@ -276,7 +276,7 @@ public class PopTip extends BaseDialog {
         }
         dialogView = createView(layoutResId);
         dialogImpl = new DialogImpl(dialogView);
-        dialogView.setTag(getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")");
+        dialogView.setTag(dialogKey());
         show(dialogView);
     }
     
@@ -312,10 +312,15 @@ public class PopTip extends BaseDialog {
         }
         dialogView = createView(layoutResId);
         dialogImpl = new DialogImpl(dialogView);
-        dialogView.setTag(getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")");
+        dialogView.setTag(dialogKey());
         show(activity, dialogView);
     }
     
+    @Override
+    public String dialogKey() {
+        return getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")";
+    }
+    
     protected Timer autoDismissTimer;
     
     public PopTip autoDismiss(long delay) {
@@ -843,7 +848,7 @@ public class PopTip extends BaseDialog {
         enterAnimDuration = 0;
         dialogView = createView(layoutResId);
         dialogImpl = new DialogImpl(dialogView);
-        dialogView.setTag(getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")");
+        dialogView.setTag(dialogKey());
         show(dialogView);
     }
 }

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

@@ -154,4 +154,9 @@ public class TipDialog extends WaitDialog {
         }
         return me();
     }
+    
+    @Override
+    public String dialogKey() {
+        return getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")";
+    }
 }

+ 12 - 16
DialogX/src/main/java/com/kongzue/dialogx/dialogs/WaitDialog.java

@@ -62,7 +62,6 @@ public class WaitDialog extends BaseDialog {
     protected BOOLEAN privateCancelable;
     
     private DialogLifecycleCallback<WaitDialog> dialogLifecycleCallback;
-    protected DialogLifecycleCallback<WaitDialog> tipDialogLifecycleCallback;
     
     protected WaitDialog() {
         super();
@@ -246,7 +245,7 @@ public class WaitDialog extends BaseDialog {
         super.beforeShow();
         dialogView = createView(R.layout.layout_dialogx_wait);
         dialogImpl = new DialogImpl(dialogView);
-        dialogView.setTag(getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")");
+        dialogView.setTag(dialogKey());
         show(dialogView);
         return this;
     }
@@ -255,7 +254,7 @@ public class WaitDialog extends BaseDialog {
         super.beforeShow();
         dialogView = createView(R.layout.layout_dialogx_wait);
         dialogImpl = new DialogImpl(dialogView);
-        dialogView.setTag(getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")");
+        dialogView.setTag(dialogKey());
         show(activity, dialogView);
         return this;
     }
@@ -463,7 +462,7 @@ public class WaitDialog extends BaseDialog {
             progressView.whenShowTick(new Runnable() {
                 @Override
                 public void run() {
-                    getTipDialogLifecycleCallback().onShow(WaitDialog.this);
+                    getDialogLifecycleCallback().onShow(WaitDialog.this);
                     refreshView();
                     ((View) progressView).postDelayed(new Runnable() {
                         @Override
@@ -478,6 +477,11 @@ public class WaitDialog extends BaseDialog {
         }
     }
     
+    @Override
+    public String dialogKey() {
+        return getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")";
+    }
+    
     @Override
     public boolean isLightTheme() {
         if (DialogX.tipTheme == null) {
@@ -531,7 +535,6 @@ public class WaitDialog extends BaseDialog {
         showType = type.ordinal();
         this.message = getString(messageResId);
         readyTipType = type;
-        setDialogLifecycleCallback(tipDialogLifecycleCallback);
         show();
     }
     
@@ -539,7 +542,6 @@ public class WaitDialog extends BaseDialog {
         showType = type.ordinal();
         this.message = getString(messageResId);
         readyTipType = type;
-        setDialogLifecycleCallback(tipDialogLifecycleCallback);
         show(activity);
     }
     
@@ -649,16 +651,6 @@ public class WaitDialog extends BaseDialog {
         return this;
     }
     
-    public DialogLifecycleCallback<WaitDialog> getTipDialogLifecycleCallback() {
-        return tipDialogLifecycleCallback == null ? new DialogLifecycleCallback<WaitDialog>() {
-        } : tipDialogLifecycleCallback;
-    }
-    
-    public WaitDialog setTipDialogLifecycleCallback(DialogLifecycleCallback<WaitDialog> dialogLifecycleCallback) {
-        this.tipDialogLifecycleCallback = dialogLifecycleCallback;
-        return this;
-    }
-    
     public WaitDialog setEnterAnimDuration(long enterAnimDuration) {
         this.enterAnimDuration = enterAnimDuration;
         return this;
@@ -677,4 +669,8 @@ public class WaitDialog extends BaseDialog {
     public void onUIModeChange(Configuration newConfig) {
         refreshUI();
     }
+    
+    public static WaitDialog getInstance(){
+        return me();
+    }
 }

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

@@ -7,6 +7,8 @@ import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.graphics.Color;
 import android.graphics.Typeface;
+import android.os.Handler;
+import android.os.Looper;
 import android.util.Log;
 import android.util.TypedValue;
 import android.view.LayoutInflater;
@@ -66,7 +68,8 @@ public abstract class BaseDialog {
     protected static void show(final View view) {
         if (rootFrameLayout == null || view == null || rootFrameLayout.get() == null) return;
         log(view.getTag() + ".show");
-        rootFrameLayout.get().post(new Runnable() {
+    
+        getMainHandler().post(new Runnable() {
             @Override
             public void run() {
                 rootFrameLayout.get().addView(view);
@@ -79,7 +82,7 @@ public abstract class BaseDialog {
         log(view.getTag() + ".show");
         final FrameLayout activityRootView = (FrameLayout) activity.getWindow().getDecorView();
         if (activityRootView == null) return;
-        activityRootView.post(new Runnable() {
+        getMainHandler().post(new Runnable() {
             @Override
             public void run() {
                 activityRootView.addView(view);
@@ -87,14 +90,19 @@ public abstract class BaseDialog {
         });
     }
     
-    protected static void dismiss(View dialogView) {
+    protected static void dismiss(final View dialogView) {
         log(dialogView.getTag() + ".dismiss");
         if (rootFrameLayout == null || dialogView == null) return;
-        if (dialogView.getParent() == null || !(dialogView.getParent() instanceof ViewGroup)) {
-            rootFrameLayout.get().removeView(dialogView);
-        } else {
-            ((ViewGroup) dialogView.getParent()).removeView(dialogView);
-        }
+        getMainHandler().post(new Runnable() {
+            @Override
+            public void run() {
+                if (dialogView.getParent() == null || !(dialogView.getParent() instanceof ViewGroup)) {
+                    rootFrameLayout.get().removeView(dialogView);
+                } else {
+                    ((ViewGroup) dialogView.getParent()).removeView(dialogView);
+                }
+            }
+        });
     }
     
     public static Context getContext() {
@@ -254,4 +262,10 @@ public abstract class BaseDialog {
     public enum BOOLEAN {
         TRUE, FALSE
     }
+    
+    public abstract String dialogKey();
+    
+    protected static Handler getMainHandler(){
+        return new Handler(Looper.getMainLooper());
+    }
 }

+ 0 - 1
DialogX/src/main/java/com/kongzue/dialogx/interfaces/DialogLifecycleCallback.java

@@ -16,5 +16,4 @@ public abstract class DialogLifecycleCallback<T extends BaseDialog> {
     public void onDismiss(T dialog){
     
     }
-    
 }

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

@@ -4,6 +4,10 @@ import android.view.LayoutInflater;
 import android.view.View;
 import android.widget.RelativeLayout;
 
+import com.kongzue.dialogx.DialogX;
+
+import static com.kongzue.dialogx.DialogX.ERROR_INIT_TIPS;
+
 /**
  * @author: Kongzue
  * @github: https://github.com/kongzue/
@@ -16,6 +20,10 @@ public abstract class OnBindView<D> {
     View customView;
     
     public OnBindView(int layoutResId) {
+        if (BaseDialog.getContext() == null){
+            DialogX.error(ERROR_INIT_TIPS);
+            return;
+        }
         this.layoutResId = layoutResId;
         customView = LayoutInflater.from(BaseDialog.getContext()).inflate(layoutResId, new RelativeLayout(BaseDialog.getContext()),false);
     }

+ 452 - 0
DialogX/src/main/java/com/kongzue/dialogx/util/views/NoArticulatedProgressView.java

@@ -0,0 +1,452 @@
+package com.kongzue.dialogx.util.views;
+
+import android.animation.TimeInterpolator;
+import android.animation.ValueAnimator;
+import android.content.Context;
+import android.content.res.Resources;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.RectF;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.HapticFeedbackConstants;
+import android.view.View;
+import android.view.animation.AccelerateDecelerateInterpolator;
+import android.view.animation.DecelerateInterpolator;
+import android.view.animation.LinearInterpolator;
+
+import androidx.annotation.Nullable;
+
+import com.kongzue.dialogx.R;
+import com.kongzue.dialogx.interfaces.ProgressViewInterface;
+
+/**
+ * @author: Kongzue
+ * @github: https://github.com/kongzue/
+ * @homepage: http://kongzue.com/
+ * @mail: myzcxhh@live.cn
+ * @createTime: 2021/3/14 20:58
+ */
+public class NoArticulatedProgressView extends View implements ProgressViewInterface {
+    public static final int STATUS_LOADING = 0;
+    public static final int STATUS_SUCCESS = 1;
+    public static final int STATUS_WARNING = 2;
+    public static final int STATUS_ERROR = 3;
+    public static final int STATUS_PROGRESSING = 4;
+    
+    private int status = STATUS_LOADING;
+    
+    private int width = dip2px(2);
+    private int color = Color.WHITE;
+    
+    public NoArticulatedProgressView(Context context) {
+        super(context);
+        init(null);
+    }
+    
+    public NoArticulatedProgressView(Context context, @Nullable AttributeSet attrs) {
+        super(context, attrs);
+        init(attrs);
+    }
+    
+    public NoArticulatedProgressView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+        init(attrs);
+    }
+    
+    public NoArticulatedProgressView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
+        super(context, attrs, defStyleAttr, defStyleRes);
+        init(attrs);
+    }
+    
+    private ValueAnimator rotateAnimator;
+    private ValueAnimator followAnimator;
+    
+    private float currentRotateDegrees;
+    private float followRotateDegrees;
+    
+    //跟随点度数做正弦值变化,halfSweepAMinValue为最低相较目标点度数差值,halfSweepAMaxValue为最大相较目标点度数差值
+    private float halfSweepAMaxValue = 180;
+    private float halfSweepAMinValue = 80;
+    //正弦函数的半径
+    private float halfSweepA;
+    
+    Paint mPaint = new Paint();
+    
+    private boolean isInited = false;
+    
+    private void init(AttributeSet attrs) {
+        synchronized (NoArticulatedProgressView.class) {
+            if (isInited) {
+                return;
+            }
+            isInited = true;
+            if (attrs != null) {
+                TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.ProgressView);
+                width = a.getDimensionPixelSize(R.styleable.ProgressView_progressStrokeWidth, dip2px(2));
+                color = a.getDimensionPixelSize(R.styleable.ProgressView_progressStrokeColor, color);
+                
+                a.recycle();
+            }
+            
+            mPaint.setAntiAlias(true);
+            mPaint.setStyle(Paint.Style.STROKE);
+            mPaint.setStrokeWidth(width);
+            mPaint.setStrokeCap(Paint.Cap.ROUND);
+            mPaint.setColor(color);
+            
+            if (!isInEditMode()) {
+                halfSweepA = (halfSweepAMaxValue - halfSweepAMinValue) / 2;
+                
+                rotateAnimator = ValueAnimator.ofFloat(0, 365);
+                rotateAnimator.setDuration(1000);
+                rotateAnimator.setInterpolator(new LinearInterpolator());
+                rotateAnimator.setRepeatCount(-1);
+                rotateAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+                    @Override
+                    public void onAnimationUpdate(ValueAnimator animation) {
+                        currentRotateDegrees = (float) animation.getAnimatedValue();
+                        invalidate();
+                    }
+                });
+                
+                followAnimator = ValueAnimator.ofFloat(0, 365);
+                followAnimator.setDuration(1500);
+                followAnimator.setInterpolator(new LinearInterpolator());
+                followAnimator.setRepeatCount(-1);
+                followAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+                    @Override
+                    public void onAnimationUpdate(ValueAnimator animation) {
+                        followRotateDegrees = (float) animation.getAnimatedValue();
+                    }
+                });
+                
+                followAnimator.start();
+                rotateAnimator.start();
+            }
+        }
+    }
+    
+    //旋转圆的中心坐标
+    private float mCenterX;
+    private float mCenterY;
+    //半径
+    private float mRadius = 100;
+    private RectF oval;
+    
+    @Override
+    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+        super.onSizeChanged(w, h, oldw, oldh);
+        mCenterX = w * 1f / 2;
+        mCenterY = h * 1f / 2;
+        mRadius = Math.min(getWidth(), getHeight()) / 2 - width / 2;
+        oval = new RectF(mCenterX - mRadius, mCenterY - mRadius, mCenterX + mRadius, mCenterY + mRadius);
+    }
+    
+    protected float oldAnimAngle;
+    private int successStep = 0;
+    
+    @Override
+    protected void onDraw(Canvas canvas) {
+        if (isInEditMode()) {
+            canvas.drawArc(oval, 0, 365, false, mPaint);
+            return;
+        }
+        if (noShowLoading) {
+            canvas.drawArc(oval, 0, 365, false, mPaint);
+            successStep = 2;
+            drawDoneMark(status, canvas);
+            return;
+        }
+        
+        float sweepAngle = (float) (halfSweepA * Math.sin(Math.toRadians(followRotateDegrees))) + halfSweepA + halfSweepAMinValue / 2;
+        switch (status) {
+            case STATUS_LOADING:
+                canvas.drawArc(oval, currentRotateDegrees, -sweepAngle, false, mPaint);
+                break;
+            case STATUS_SUCCESS:
+            case STATUS_WARNING:
+            case STATUS_ERROR:
+                canvas.drawArc(oval, 0, 360, false, mPaint);
+                drawDoneMark(status, canvas);
+                break;
+            case STATUS_PROGRESSING:
+                canvas.drawArc(oval, -90, currentRotateDegrees, false, mPaint);
+                if (waitProgressingRunnable != null) {
+                    waitProgressingRunnable.run();
+                    waitProgressingRunnable = null;
+                }
+                break;
+        }
+    }
+    
+    private void drawDoneMark(int status, Canvas canvas) {
+        if (rotateAnimator.getInterpolator() != interpolator) {
+            rotateAnimator.setInterpolator(interpolator);
+        }
+        if (tickShowRunnable != null) {
+            tickShowRunnable.run();
+            performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
+            tickShowRunnable = null;
+        }
+        switch (status) {
+            case STATUS_SUCCESS:
+                showSuccessTick(canvas);
+                break;
+            case STATUS_WARNING:
+                showWarningTick(canvas);
+                break;
+            case STATUS_ERROR:
+                showErrorTick(canvas);
+                break;
+        }
+    }
+    
+    private int line1X = 0;
+    private int line1Y = 0;
+    private int line2X = 0;
+    private int line2Y = 0;
+    
+    private int tickStep = 0;
+    
+    //绘制对号
+    private void showSuccessTick(Canvas canvas) {
+        int tickLeftPoint = (int) (mCenterX - mRadius * 1 / 2);
+        int tickTurnLeftPoint = (int) (mCenterX - mRadius / 10);
+        int tickRightPoint = (int) (mRadius * 0.99f);
+        int speed = 2;
+        switch (tickStep) {
+            case 0:
+                if (tickLeftPoint + line1X < tickTurnLeftPoint) {
+                    line1X = line1X + speed;
+                    line1Y = line1Y + speed;
+                } else {
+                    line2X = line1X;
+                    line2Y = line1Y;
+                    tickStep = 1;
+                }
+                break;
+            case 1:
+                if (line2X < tickRightPoint) {
+                    line2X = line2X + 4;
+                    line2Y = line2Y - 5;
+                }
+                break;
+        }
+        canvas.drawLine(tickLeftPoint, mCenterY, tickLeftPoint + line1X, mCenterY + line1Y, mPaint);
+        canvas.drawLine(tickLeftPoint + line1X, mCenterY + line1Y, tickLeftPoint + line2X, mCenterY + line2Y, mPaint);
+        
+        postInvalidateDelayed(1);
+    }
+    
+    //绘制感叹号
+    private void showWarningTick(Canvas canvas) {
+        int tickLeftPoint = (int) mCenterX;
+        int line1StartY = (int) (mCenterY - mRadius * 1 / 2);
+        int line1EndY = (int) (mCenterY + mRadius * 1 / 8);
+        int line2StartY = (int) (mCenterY + mRadius * 3 / 7);
+        int speed = 4;
+        switch (tickStep) {
+            case 0:
+                if (line1Y < line1EndY - line1StartY) {
+                    line1Y = line1Y + speed;
+                } else {
+                    line1Y = line1EndY - line1StartY;
+                    tickStep = 1;
+                }
+                break;
+            case 1:
+                if (line2Y != line2StartY) {
+                    canvas.drawLine(tickLeftPoint, line2StartY, tickLeftPoint, line2StartY + 1, mPaint);
+                }
+                break;
+        }
+        canvas.drawLine(tickLeftPoint, line1StartY, tickLeftPoint, line1StartY + line1Y, mPaint);
+        postInvalidateDelayed(tickStep == 1 ? 100 : 1);
+    }
+    
+    //绘制错误符号
+    private void showErrorTick(Canvas canvas) {
+        int tickLeftPoint = (int) (mCenterX - mRadius * 4 / 10);
+        int tickRightPoint = (int) (mCenterX + mRadius * 4 / 10);
+        int tickTopPoint = (int) (mCenterY - mRadius * 4 / 10);
+        int speed = 4;
+        
+        switch (tickStep) {
+            case 0:
+                if (tickRightPoint - line1X > tickLeftPoint) {
+                    line1X = line1X + speed;
+                    line1Y = line1Y + speed;
+                } else {
+                    tickStep = 1;
+                    canvas.drawLine(tickRightPoint, tickTopPoint, tickRightPoint - line1X, tickTopPoint + line1Y, mPaint);
+                    postInvalidateDelayed(150);
+                    return;
+                }
+                break;
+            case 1:
+                if (tickLeftPoint + line2X < tickRightPoint) {
+                    line2X = line2X + speed;
+                    line2Y = line2Y + speed;
+                }
+                canvas.drawLine(tickLeftPoint, tickTopPoint, tickLeftPoint + line2X, tickTopPoint + line2Y, mPaint);
+                break;
+        }
+        canvas.drawLine(tickRightPoint, tickTopPoint, tickRightPoint - line1X, tickTopPoint + line1Y, mPaint);
+        postInvalidateDelayed(1);
+    }
+    
+    private TimeInterpolator interpolator;
+    private Runnable waitProgressingRunnable;
+    
+    public void success() {
+        if (status == STATUS_PROGRESSING) {
+            progress(1f);
+            waitProgressingRunnable = new Runnable() {
+                @Override
+                public void run() {
+                    tickStep = 0;
+                    successStep = 2;
+                    interpolator = new AccelerateDecelerateInterpolator();
+                    status = STATUS_SUCCESS;
+                }
+            };
+            return;
+        }
+        tickStep = 0;
+        interpolator = new AccelerateDecelerateInterpolator();
+        status = STATUS_SUCCESS;
+        invalidate();
+    }
+    
+    public void warning() {
+        if (status == STATUS_PROGRESSING) {
+            progress(1f);
+            waitProgressingRunnable = new Runnable() {
+                @Override
+                public void run() {
+                    tickStep = 0;
+                    successStep = 2;
+                    interpolator = new DecelerateInterpolator(2);
+                    status = STATUS_WARNING;
+                }
+            };
+            return;
+        }
+        tickStep = 0;
+        interpolator = new DecelerateInterpolator(2);
+        status = STATUS_WARNING;
+        invalidate();
+    }
+    
+    public void error() {
+        if (status == STATUS_PROGRESSING) {
+            progress(1f);
+            waitProgressingRunnable = new Runnable() {
+                @Override
+                public void run() {
+                    tickStep = 0;
+                    successStep = 2;
+                    interpolator = new DecelerateInterpolator(2);
+                    status = STATUS_ERROR;
+                }
+            };
+            return;
+        }
+        tickStep = 0;
+        interpolator = new DecelerateInterpolator(2);
+        status = STATUS_ERROR;
+        invalidate();
+    }
+    
+    public void progress(float progress) {
+        if (rotateAnimator != null) rotateAnimator.cancel();
+        if (followAnimator != null) followAnimator.cancel();
+        if (status != STATUS_PROGRESSING) {
+            currentRotateDegrees = 0;
+        }
+        rotateAnimator = ValueAnimator.ofFloat(currentRotateDegrees, 365 * progress);
+        rotateAnimator.setDuration(1000);
+        rotateAnimator.setInterpolator(new DecelerateInterpolator(2));
+        rotateAnimator.setRepeatCount(0);
+        rotateAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+            @Override
+            public void onAnimationUpdate(ValueAnimator animation) {
+                currentRotateDegrees = (float) animation.getAnimatedValue();
+                invalidate();
+            }
+        });
+        rotateAnimator.start();
+        status = STATUS_PROGRESSING;
+    }
+    
+    private Runnable tickShowRunnable;
+    
+    public NoArticulatedProgressView whenShowTick(Runnable runnable) {
+        tickShowRunnable = runnable;
+        return this;
+    }
+    
+    public void loading() {
+        noShowLoading = false;
+        oldAnimAngle = 0;
+        successStep = 0;
+        line1X = 0;
+        line1Y = 0;
+        line2X = 0;
+        line2Y = 0;
+        status = STATUS_LOADING;
+        if (rotateAnimator != null) rotateAnimator.cancel();
+        if (followAnimator != null) followAnimator.cancel();
+        isInited = false;
+        init(null);
+    }
+    
+    public int getStatus() {
+        return status;
+    }
+    
+    @Override
+    protected void onDetachedFromWindow() {
+        if (rotateAnimator != null) {
+            rotateAnimator.cancel();
+        }
+        if (followAnimator != null) {
+            followAnimator.cancel();
+        }
+        super.onDetachedFromWindow();
+    }
+    
+    public int getStrokeWidth() {
+        return width;
+    }
+    
+    public NoArticulatedProgressView setStrokeWidth(int width) {
+        this.width = width;
+        if (mPaint != null) mPaint.setStrokeWidth(width);
+        return this;
+    }
+    
+    public int getColor() {
+        return color;
+    }
+    
+    public NoArticulatedProgressView setColor(int color) {
+        this.color = color;
+        if (mPaint != null) mPaint.setColor(color);
+        return this;
+    }
+    
+    private boolean noShowLoading;
+    
+    public void noLoading() {
+        noShowLoading = true;
+    }
+    
+    private int dip2px(float dpValue) {
+        final float scale = Resources.getSystem().getDisplayMetrics().density;
+        return (int) (dpValue * scale + 0.5f);
+    }
+}

+ 2 - 1
DialogXIOSStyle/src/main/res/layout/layout_dialogx_ios.xml

@@ -99,7 +99,8 @@
                     android:layout_width="match_parent"
                     android:layout_height="1px"
                     android:layout_marginTop="15dp"
-                    android:background="@color/dialogxIOSSplitLight" />
+                    android:background="@color/dialogxIOSSplitLight"
+                    android:tag="split" />
 
                 <LinearLayout
                     android:id="@+id/box_button"

+ 2 - 1
DialogXIOSStyle/src/main/res/layout/layout_dialogx_ios_dark.xml

@@ -99,7 +99,8 @@
                     android:layout_width="match_parent"
                     android:layout_height="1px"
                     android:layout_marginTop="15dp"
-                    android:background="@color/dialogxIOSSplitDark" />
+                    android:background="@color/dialogxIOSSplitDark"
+                    android:tag="split" />
 
                 <LinearLayout
                     android:id="@+id/box_button"

+ 3 - 3
app/build.gradle

@@ -31,9 +31,9 @@ dependencies {
     implementation 'androidx.appcompat:appcompat:1.2.0'
     implementation 'com.kongzue.baseframeworkx:baseframework:6.7.7'
 
-    implementation 'com.kongzue.dialogx.style.ios:DialogXIOSStyle:0.0.23'
-    implementation 'com.kongzue.dialogx.style.kongzue:DialogXKongzueStyle:0.0.23'
-    implementation 'com.kongzue.dialogx.style.miui:DialogXMIUIStyle:0.0.23'
+    implementation 'com.kongzue.dialogx.style.ios:DialogXIOSStyle:0.0.33'
+    implementation 'com.kongzue.dialogx.style.kongzue:DialogXKongzueStyle:0.0.33'
+    implementation 'com.kongzue.dialogx.style.miui:DialogXMIUIStyle:0.0.33'
 
     implementation project(path: ':DialogX')
 }

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

@@ -2,6 +2,8 @@ package com.kongzue.dialogxdemo;
 
 import com.kongzue.baseframework.BaseApp;
 import com.kongzue.dialogx.DialogX;
+import com.kongzue.dialogx.dialogs.CustomDialog;
+import com.kongzue.dialogx.style.MaterialStyle;
 
 /**
  * @author: Kongzue
@@ -14,5 +16,8 @@ public class App extends BaseApp<App> {
     @Override
     public void init() {
         DialogX.init(this);
+        DialogX.globalStyle = CustomStyle.style();
+        DialogX.globalTheme = DialogX.THEME.AUTO;
+        DialogX.onlyOnePopTip = false;
     }
 }

+ 11 - 216
app/src/main/java/com/kongzue/dialogxdemo/CustomStyle.java

@@ -1,12 +1,9 @@
 package com.kongzue.dialogxdemo;
 
 import android.content.Context;
-import android.content.res.Resources;
-
-import com.kongzue.dialogx.interfaces.DialogXStyle;
 import com.kongzue.dialogx.interfaces.ProgressViewInterface;
-import com.kongzue.dialogx.style.IOSStyle;
-import com.kongzue.dialogx.style.views.ProgressView;
+import com.kongzue.dialogx.style.MaterialStyle;
+import com.kongzue.dialogx.util.views.NoArticulatedProgressView;
 
 /**
  * @author: Kongzue
@@ -15,7 +12,7 @@ import com.kongzue.dialogx.style.views.ProgressView;
  * @mail: myzcxhh@live.cn
  * @createTime: 2021/2/20 19:58
  */
-public class CustomStyle implements DialogXStyle {
+public class CustomStyle extends MaterialStyle {
     
     private CustomStyle() {
     }
@@ -25,228 +22,26 @@ public class CustomStyle implements DialogXStyle {
     }
     
     @Override
-    public int layout(boolean light) {
-        return light ? com.kongzue.dialogx.iostheme.R.layout.layout_dialogx_ios : com.kongzue.dialogx.iostheme.R.layout.layout_dialogx_ios_dark;
-    }
-    
-    @Override
-    public int enterAnimResId() {
-        return com.kongzue.dialogx.iostheme.R.anim.anim_dialogx_ios_enter;
-    }
-    
-    @Override
-    public int exitAnimResId() {
-        return 0;
-    }
-    
-    @Override
-    public int[] verticalButtonOrder() {
-        return new int[]{BUTTON_OK, SPLIT, BUTTON_OTHER, SPLIT, BUTTON_CANCEL};
-    }
-    
-    @Override
-    public int[] horizontalButtonOrder() {
-        return new int[]{BUTTON_CANCEL, SPLIT, BUTTON_OTHER, SPLIT, BUTTON_OK};
-    }
-    
-    @Override
-    public int splitWidthPx() {
-        return 1;
-    }
-    
-    @Override
-    public int splitColorRes(boolean light) {
-        return light ? com.kongzue.dialogx.iostheme.R.color.dialogxIOSSplitLight : com.kongzue.dialogx.iostheme.R.color.dialogxIOSSplitDark;
-    }
-    
-    @Override
-    public DialogXStyle.BlurBackgroundSetting messageDialogBlurSettings() {
-        return new DialogXStyle.BlurBackgroundSetting() {
+    public WaitTipRes overrideWaitTipRes() {
+        return new WaitTipRes() {
             @Override
             public boolean blurBackground() {
-                return true;
-            }
-            
-            @Override
-            public int blurForwardColorRes(boolean light) {
-                return light ? com.kongzue.dialogx.iostheme.R.color.dialogxIOSBkgLight : com.kongzue.dialogx.iostheme.R.color.dialogxIOSBkgDark;
-            }
-            
-            @Override
-            public int blurBackgroundRoundRadiusPx() {
-                return dip2px(15);
-            }
-        };
-    }
-    
-    private int dip2px(float dpValue) {
-        final float scale = Resources.getSystem().getDisplayMetrics().density;
-        return (int) (dpValue * scale + 0.5f);
-    }
-    
-    @Override
-    public DialogXStyle.HorizontalButtonRes overrideHorizontalButtonRes() {
-        return new DialogXStyle.HorizontalButtonRes() {
-            @Override
-            public int overrideHorizontalOkButtonBackgroundRes(int visibleButtonCount, boolean light) {
-                if (visibleButtonCount == 1) {
-                    return light ? com.kongzue.dialogx.iostheme.R.drawable.button_dialogx_ios_bottom_light : com.kongzue.dialogx.iostheme.R.drawable.button_dialogx_ios_bottom_night;
-                } else {
-                    return light ? com.kongzue.dialogx.iostheme.R.drawable.button_dialogx_ios_right_light : com.kongzue.dialogx.iostheme.R.drawable.button_dialogx_ios_right_night;
-                }
-            }
-            
-            @Override
-            public int overrideHorizontalCancelButtonBackgroundRes(int visibleButtonCount, boolean light) {
-                return light ? com.kongzue.dialogx.iostheme.R.drawable.button_dialogx_ios_left_light : com.kongzue.dialogx.iostheme.R.drawable.button_dialogx_ios_left_night;
-            }
-            
-            @Override
-            public int overrideHorizontalOtherButtonBackgroundRes(int visibleButtonCount, boolean light) {
-                return light ? com.kongzue.dialogx.iostheme.R.drawable.button_dialogx_ios_center_light : com.kongzue.dialogx.iostheme.R.drawable.button_dialogx_ios_center_night;
-            }
-        };
-    }
-    
-    @Override
-    public DialogXStyle.VerticalButtonRes overrideVerticalButtonRes() {
-        return new DialogXStyle.VerticalButtonRes() {
-            @Override
-            public int overrideVerticalOkButtonBackgroundRes(int visibleButtonCount, boolean light) {
-                return light ? com.kongzue.dialogx.iostheme.R.drawable.button_dialogx_ios_center_light : com.kongzue.dialogx.iostheme.R.drawable.button_dialogx_ios_center_night;
-            }
-            
-            @Override
-            public int overrideVerticalCancelButtonBackgroundRes(int visibleButtonCount, boolean light) {
-                return light ? com.kongzue.dialogx.iostheme.R.drawable.button_dialogx_ios_bottom_light : com.kongzue.dialogx.iostheme.R.drawable.button_dialogx_ios_bottom_night;
-            }
-            
-            @Override
-            public int overrideVerticalOtherButtonBackgroundRes(int visibleButtonCount, boolean light) {
-                return light ? com.kongzue.dialogx.iostheme.R.drawable.button_dialogx_ios_center_light : com.kongzue.dialogx.iostheme.R.drawable.button_dialogx_ios_center_night;
-            }
-        };
-    }
-    
-    @Override
-    public DialogXStyle.WaitTipRes overrideWaitTipRes() {
-        return new DialogXStyle.WaitTipRes() {
-            @Override
-            public boolean blurBackground() {
-                return true;
+                return false;
             }
-            
+        
             @Override
             public int overrideBackgroundColorRes(boolean light) {
                 return 0;
             }
-            
+        
             @Override
             public int overrideTextColorRes(boolean light) {
-                return light ? com.kongzue.dialogx.iostheme.R.color.white : com.kongzue.dialogx.iostheme.R.color.black;
+                return light ? com.kongzue.dialogx.R.color.white : com.kongzue.dialogx.R.color.black;
             }
-            
+        
             @Override
             public ProgressViewInterface overrideWaitView(Context context, boolean light) {
-                return new ProgressView(context).setLightMode(light);
-            }
-        };
-    }
-    
-    @Override
-    public DialogXStyle.BottomDialogRes overrideBottomDialogRes() {
-        return new DialogXStyle.BottomDialogRes() {
-            
-            @Override
-            public boolean touchSlide() {
-                return false;
-            }
-            
-            @Override
-            public int overrideDialogLayout(boolean light) {
-                //return light ? R.layout.layout_dialogx_bottom_material : R.layout.layout_dialogx_bottom_material_dark;
-                return light ? com.kongzue.dialogx.iostheme.R.layout.layout_dialogx_bottom_ios : com.kongzue.dialogx.iostheme.R.layout.layout_dialogx_bottom_ios_dark;
-            }
-            
-            @Override
-            public int overrideMenuDividerDrawableRes(boolean light) {
-                return light ? com.kongzue.dialogx.iostheme.R.drawable.rect_dialogx_ios_menu_split_divider : com.kongzue.dialogx.iostheme.R.drawable.rect_dialogx_ios_menu_split_divider_night;
-            }
-            
-            @Override
-            public int overrideMenuDividerHeight(boolean light) {
-                return 1;
-            }
-            
-            @Override
-            public int overrideMenuTextColor(boolean light) {
-                return light ? com.kongzue.dialogx.iostheme.R.color.dialogxIOSBlue : com.kongzue.dialogx.iostheme.R.color.dialogxIOSBlueDark;
-            }
-            
-            @Override
-            public float overrideBottomDialogMaxHeight() {
-                return 0f;
-            }
-            
-            @Override
-            public int overrideMenuItemLayout(boolean light, int index, int count, boolean isContentVisibility) {
-                if (light) {
-                    if (index == 0) {
-                        return isContentVisibility ? com.kongzue.dialogx.iostheme.R.layout.item_dialogx_ios_bottom_menu_center_light : com.kongzue.dialogx.iostheme.R.layout.item_dialogx_ios_bottom_menu_top_light;
-                    } else if (index == count - 1) {
-                        return com.kongzue.dialogx.iostheme.R.layout.item_dialogx_ios_bottom_menu_bottom_light;
-                    } else {
-                        return com.kongzue.dialogx.iostheme.R.layout.item_dialogx_ios_bottom_menu_center_light;
-                    }
-                } else {
-                    if (index == 0) {
-                        return isContentVisibility ? com.kongzue.dialogx.iostheme.R.layout.item_dialogx_ios_bottom_menu_center_dark : com.kongzue.dialogx.iostheme.R.layout.item_dialogx_ios_bottom_menu_top_dark;
-                    } else if (index == count - 1) {
-                        return com.kongzue.dialogx.iostheme.R.layout.item_dialogx_ios_bottom_menu_bottom_dark;
-                    } else {
-                        return com.kongzue.dialogx.iostheme.R.layout.item_dialogx_ios_bottom_menu_center_dark;
-                    }
-                }
-            }
-            
-            @Override
-            public int overrideSelectionMenuBackgroundColor(boolean light) {
-                return 0;
-            }
-            
-            @Override
-            public boolean selectionImageTint(boolean light) {
-                return true;
-            }
-            
-            @Override
-            public int overrideSelectionImage(boolean light, boolean isSelected) {
-                return 0;
-            }
-        };
-    }
-    
-    @Override
-    public DialogXStyle.PopTipSettings popTipSettings() {
-        return new DialogXStyle.PopTipSettings() {
-            @Override
-            public int layout(boolean light) {
-                return light? com.kongzue.dialogx.iostheme.R.layout.layout_dialogx_poptip_ios : com.kongzue.dialogx.iostheme.R.layout.layout_dialogx_poptip_ios_dark;
-            }
-            
-            @Override
-            public ALIGN align() {
-                return ALIGN.BOTTOM;
-            }
-            
-            @Override
-            public int enterAnimResId(boolean b) {
-                return com.kongzue.dialogx.iostheme.R.anim.anim_dialogx_bottom_enter;
-            }
-            
-            @Override
-            public int exitAnimResId(boolean b) {
-                return com.kongzue.dialogx.iostheme.R.anim.anim_dialogx_bottom_exit;
+                return new NoArticulatedProgressView(context);
             }
         };
     }

+ 3 - 3
app/src/main/java/com/kongzue/dialogxdemo/MainActivity.java

@@ -7,6 +7,7 @@ import android.content.res.Configuration;
 import android.graphics.Color;
 import android.net.Uri;
 import android.os.Handler;
+import android.util.Log;
 import android.view.View;
 import android.view.inputmethod.InputMethodManager;
 import android.webkit.WebSettings;
@@ -15,12 +16,14 @@ import android.webkit.WebViewClient;
 import android.widget.EditText;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
+import android.widget.ProgressBar;
 import android.widget.RadioButton;
 import android.widget.RadioGroup;
 import android.widget.RelativeLayout;
 import android.widget.TextView;
 
 import androidx.annotation.NonNull;
+import androidx.appcompat.view.ContextThemeWrapper;
 
 import com.kongzue.baseframework.BaseActivity;
 import com.kongzue.baseframework.interfaces.DarkNavigationBarTheme;
@@ -145,9 +148,6 @@ public class MainActivity extends BaseActivity {
     @Override
     public void initDatas(JumpParameter parameter) {
         refreshUIMode();
-        DialogX.globalStyle = MaterialStyle.style();
-        DialogX.globalTheme = DialogX.THEME.AUTO;
-        DialogX.onlyOnePopTip = false;
         
         boolean showBreak = parameter.getBoolean("showBreak");
         if (showBreak) {

+ 2 - 2
gradle.properties

@@ -18,5 +18,5 @@ android.useAndroidX=true
 # Automatically convert third-party libraries to use AndroidX
 android.enableJetifier=true
 
-BUILD_VERSION=0.0.33.beta2
-BUILD_VERSION_INT=33
+BUILD_VERSION=0.0.34
+BUILD_VERSION_INT=34