瀏覽代碼

0.0.50.beta6
- 所有对话框增加 `.onShow(DialogXRunnable)` 和 `.onDismiss(DialogXRunnable)` 来快速设置对话框启动和关闭时触发的事件;
- 新增选项 `get/setEnableImmersiveMode(boolean)` 可以设置对话框是否采用沉浸式适配,如果不采用对话框 UI 可能显示到非安全区域,另增加全局变量: `DialogX.enableImmersiveMode = (boolean)`;
- 新增全局选项 `DialogX.ignoreUnsafeInsetsHorizontal = (boolean)` 可设置是否忽略横向非安全区域,以处理对于部分 activity 在存在刘海屏的设备上横屏显示时,对话框左侧出现边距的问题;

Kongzue 1 年之前
父節點
當前提交
69e255c0f9
共有 20 個文件被更改,包括 485 次插入204 次删除
  1. 7 1
      DialogX/src/main/java/com/kongzue/dialogx/DialogX.java
  2. 23 2
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/BottomDialog.java
  3. 20 0
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/BottomMenu.java
  4. 38 9
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/CustomDialog.java
  5. 23 2
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/FullScreenDialog.java
  6. 144 126
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/GuideDialog.java
  7. 20 0
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/InputDialog.java
  8. 26 2
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/MessageDialog.java
  9. 23 2
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/PopMenu.java
  10. 19 5
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/PopNotification.java
  11. 16 2
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/PopTip.java
  12. 53 33
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/TipDialog.java
  13. 11 9
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/WaitDialog.java
  14. 23 1
      DialogX/src/main/java/com/kongzue/dialogx/interfaces/BaseDialog.java
  15. 12 0
      DialogX/src/main/java/com/kongzue/dialogx/util/DialogXValueAnimator.java
  16. 6 6
      DialogX/src/main/java/com/kongzue/dialogx/util/views/DialogXBaseRelativeLayout.java
  17. 4 3
      app/src/main/java/com/kongzue/dialogxdemo/App.java
  18. 14 0
      app/src/main/java/com/kongzue/dialogxdemo/activity/MainActivity.java
  19. 2 0
      app/src/main/res/values/styles.xml
  20. 1 1
      gradle.properties

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

@@ -164,7 +164,13 @@ public class DialogX {
     public static int defaultPopTipBackgroundRadius = -1;
 
     public static int defaultPopNotificationBackgroundRadius = -1;
-    
+
+    //开启沉浸式适配
+    public static boolean enableImmersiveMode = true;
+
+    //沉浸式忽略左右的非安全区
+    public static boolean ignoreUnsafeInsetsHorizontal = false;
+
     public enum THEME {
         LIGHT, DARK, AUTO
     }

+ 23 - 2
DialogX/src/main/java/com/kongzue/dialogx/dialogs/BottomDialog.java

@@ -32,6 +32,7 @@ import com.kongzue.dialogx.interfaces.DialogConvertViewInterface;
 import com.kongzue.dialogx.interfaces.DialogLifecycleCallback;
 import com.kongzue.dialogx.interfaces.DialogXAnimInterface;
 import com.kongzue.dialogx.interfaces.DialogXBaseBottomDialog;
+import com.kongzue.dialogx.interfaces.DialogXRunnable;
 import com.kongzue.dialogx.interfaces.DialogXStyle;
 import com.kongzue.dialogx.interfaces.OnBackPressedListener;
 import com.kongzue.dialogx.interfaces.OnBackgroundMaskClickListener;
@@ -506,6 +507,7 @@ public class BottomDialog extends BaseDialog implements DialogXBaseBottomDialog
             if (boxRoot == null || getOwnActivity() == null) {
                 return;
             }
+            boxRoot.setAutoUnsafePlacePadding(isEnableImmersiveMode());
             boxRoot.setRootPadding(screenPaddings[0], screenPaddings[1], screenPaddings[2], screenPaddings[3]);
             if (backgroundColor != null) {
                 tintColor(bkg, backgroundColor);
@@ -1297,7 +1299,7 @@ public class BottomDialog extends BaseDialog implements DialogXBaseBottomDialog
      * }
      * }
      */
-    public void onShow(BottomDialog dialog) {
+    protected void onShow(BottomDialog dialog) {
 
     }
 
@@ -1321,7 +1323,7 @@ public class BottomDialog extends BaseDialog implements DialogXBaseBottomDialog
      * }
      */
     //用于使用 new 构建实例时,override 的生命周期事件
-    public void onDismiss(BottomDialog dialog) {
+    protected void onDismiss(BottomDialog dialog) {
 
     }
 
@@ -1348,4 +1350,23 @@ public class BottomDialog extends BaseDialog implements DialogXBaseBottomDialog
         data.put(key, obj);
         return this;
     }
+
+    public BottomDialog onShow(DialogXRunnable<BottomDialog> dialogXRunnable) {
+        onShowRunnable = dialogXRunnable;
+        if (isShow() && onShowRunnable != null) {
+            onShowRunnable.run(this);
+        }
+        return this;
+    }
+
+    public BottomDialog onDismiss(DialogXRunnable<BottomDialog> dialogXRunnable) {
+        onDismissRunnable = dialogXRunnable;
+        return this;
+    }
+
+    public BottomDialog setEnableImmersiveMode(boolean enableImmersiveMode) {
+        this.enableImmersiveMode = enableImmersiveMode;
+        refreshUI();
+        return this;
+    }
 }

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

@@ -17,6 +17,7 @@ import com.kongzue.dialogx.R;
 import com.kongzue.dialogx.interfaces.BottomMenuListViewTouchEvent;
 import com.kongzue.dialogx.interfaces.DialogLifecycleCallback;
 import com.kongzue.dialogx.interfaces.DialogXAnimInterface;
+import com.kongzue.dialogx.interfaces.DialogXRunnable;
 import com.kongzue.dialogx.interfaces.DialogXStyle;
 import com.kongzue.dialogx.interfaces.MenuItemLayoutRefreshCallback;
 import com.kongzue.dialogx.interfaces.MenuItemTextInfoInterceptor;
@@ -1370,4 +1371,23 @@ public class BottomMenu extends BottomDialog {
         data.put(key, obj);
         return this;
     }
+
+    public BottomMenu onShow(DialogXRunnable<BottomDialog> dialogXRunnable) {
+        onShowRunnable = dialogXRunnable;
+        if (isShow() && onShowRunnable != null) {
+            onShowRunnable.run(this);
+        }
+        return this;
+    }
+
+    public BottomMenu onDismiss(DialogXRunnable<BottomDialog> dialogXRunnable) {
+        onDismissRunnable = dialogXRunnable;
+        return this;
+    }
+
+    public BottomMenu setEnableImmersiveMode(boolean enableImmersiveMode) {
+        this.enableImmersiveMode = enableImmersiveMode;
+        refreshUI();
+        return this;
+    }
 }

+ 38 - 9
DialogX/src/main/java/com/kongzue/dialogx/dialogs/CustomDialog.java

@@ -22,6 +22,7 @@ import com.kongzue.dialogx.interfaces.BaseDialog;
 import com.kongzue.dialogx.interfaces.DialogConvertViewInterface;
 import com.kongzue.dialogx.interfaces.DialogLifecycleCallback;
 import com.kongzue.dialogx.interfaces.DialogXAnimInterface;
+import com.kongzue.dialogx.interfaces.DialogXRunnable;
 import com.kongzue.dialogx.interfaces.DialogXStyle;
 import com.kongzue.dialogx.interfaces.OnBackPressedListener;
 import com.kongzue.dialogx.interfaces.OnBackgroundMaskClickListener;
@@ -55,7 +56,6 @@ public class CustomDialog extends BaseDialog {
     protected int enterAnimResId = R.anim.anim_dialogx_default_enter;
     protected int exitAnimResId = R.anim.anim_dialogx_default_exit;
     protected ALIGN align = ALIGN.CENTER;
-    protected boolean autoUnsafePlacePadding = true;
     protected int maskColor = Color.TRANSPARENT;
     protected BOOLEAN privateCancelable;
     protected boolean bkgInterceptTouch = true;
@@ -251,6 +251,7 @@ public class CustomDialog extends BaseDialog {
             if (boxRoot == null || getOwnActivity() == null) {
                 return;
             }
+            boxRoot.setAutoUnsafePlacePadding(isEnableImmersiveMode());
             boxRoot.setRootPadding(screenPaddings[0], screenPaddings[1], screenPaddings[2], screenPaddings[3]);
             if (baseView() != null) {
                 if (!initSetCustomViewLayoutListener) {
@@ -390,7 +391,6 @@ public class CustomDialog extends BaseDialog {
                 }
             }
 
-            boxRoot.setAutoUnsafePlacePadding(autoUnsafePlacePadding);
             if (bkgInterceptTouch) {
                 if (isCancelable()) {
                     boxRoot.setOnClickListener(new View.OnClickListener() {
@@ -756,18 +756,28 @@ public class CustomDialog extends BaseDialog {
     }
 
     public boolean isAutoUnsafePlacePadding() {
-        return autoUnsafePlacePadding;
+        return isEnableImmersiveMode();
     }
 
+    /**
+     * 改为使用 .setEnableImmersiveMode(boolean) 来控制是否适配沉浸式
+     * @param autoUnsafePlacePadding 是否适配沉浸式
+     * @return CustomDialog
+     */
+    @Deprecated
     public CustomDialog setAutoUnsafePlacePadding(boolean autoUnsafePlacePadding) {
-        this.autoUnsafePlacePadding = autoUnsafePlacePadding;
-        refreshUI();
+        setEnableImmersiveMode(autoUnsafePlacePadding);
         return this;
     }
 
+    /**
+     * 改为使用 .setEnableImmersiveMode(boolean) 来控制是否适配沉浸式
+     * @param fullscreen 是否适配沉浸式
+     * @return CustomDialog
+     */
+    @Deprecated
     public CustomDialog setFullScreen(boolean fullscreen) {
-        this.autoUnsafePlacePadding = !autoUnsafePlacePadding;
-        refreshUI();
+        setEnableImmersiveMode(!fullscreen);
         return this;
     }
 
@@ -1058,7 +1068,7 @@ public class CustomDialog extends BaseDialog {
      * }
      * }
      */
-    public void onShow(CustomDialog dialog) {
+    protected void onShow(CustomDialog dialog) {
 
     }
 
@@ -1082,7 +1092,7 @@ public class CustomDialog extends BaseDialog {
      * }
      */
     //用于使用 new 构建实例时,override 的生命周期事件
-    public void onDismiss(CustomDialog dialog) {
+    protected void onDismiss(CustomDialog dialog) {
 
     }
 
@@ -1105,4 +1115,23 @@ public class CustomDialog extends BaseDialog {
         data.put(key, obj);
         return this;
     }
+
+    public CustomDialog onShow(DialogXRunnable<CustomDialog> dialogXRunnable) {
+        onShowRunnable = dialogXRunnable;
+        if (isShow() && onShowRunnable != null) {
+            onShowRunnable.run(this);
+        }
+        return this;
+    }
+
+    public CustomDialog onDismiss(DialogXRunnable<CustomDialog> dialogXRunnable) {
+        onDismissRunnable = dialogXRunnable;
+        return this;
+    }
+
+    public CustomDialog setEnableImmersiveMode(boolean enableImmersiveMode) {
+        this.enableImmersiveMode = enableImmersiveMode;
+        refreshUI();
+        return this;
+    }
 }

+ 23 - 2
DialogX/src/main/java/com/kongzue/dialogx/dialogs/FullScreenDialog.java

@@ -28,6 +28,7 @@ import com.kongzue.dialogx.interfaces.DialogConvertViewInterface;
 import com.kongzue.dialogx.interfaces.DialogLifecycleCallback;
 import com.kongzue.dialogx.interfaces.DialogXAnimInterface;
 import com.kongzue.dialogx.interfaces.DialogXBaseBottomDialog;
+import com.kongzue.dialogx.interfaces.DialogXRunnable;
 import com.kongzue.dialogx.interfaces.DialogXStyle;
 import com.kongzue.dialogx.interfaces.OnBackPressedListener;
 import com.kongzue.dialogx.interfaces.OnBackgroundMaskClickListener;
@@ -320,6 +321,7 @@ public class FullScreenDialog extends BaseDialog implements DialogXBaseBottomDia
             if (boxRoot == null || getOwnActivity() == null) {
                 return;
             }
+            boxRoot.setAutoUnsafePlacePadding(isEnableImmersiveMode());
             boxRoot.setRootPadding(screenPaddings[0], screenPaddings[1], screenPaddings[2], screenPaddings[3]);
             if (backgroundColor != null) {
                 tintColor(bkg, backgroundColor);
@@ -828,7 +830,7 @@ public class FullScreenDialog extends BaseDialog implements DialogXBaseBottomDia
      * }
      * }
      */
-    public void onShow(FullScreenDialog dialog) {
+    protected void onShow(FullScreenDialog dialog) {
 
     }
 
@@ -852,7 +854,7 @@ public class FullScreenDialog extends BaseDialog implements DialogXBaseBottomDia
      * }
      */
     //用于使用 new 构建实例时,override 的生命周期事件
-    public void onDismiss(FullScreenDialog dialog) {
+    protected void onDismiss(FullScreenDialog dialog) {
 
     }
 
@@ -924,4 +926,23 @@ public class FullScreenDialog extends BaseDialog implements DialogXBaseBottomDia
         data.put(key, obj);
         return this;
     }
+
+    public FullScreenDialog onShow(DialogXRunnable<FullScreenDialog> dialogXRunnable) {
+        onShowRunnable = dialogXRunnable;
+        if (isShow() && onShowRunnable != null) {
+            onShowRunnable.run(this);
+        }
+        return this;
+    }
+
+    public FullScreenDialog onDismiss(DialogXRunnable<FullScreenDialog> dialogXRunnable) {
+        onDismissRunnable = dialogXRunnable;
+        return this;
+    }
+
+    public FullScreenDialog setEnableImmersiveMode(boolean enableImmersiveMode) {
+        this.enableImmersiveMode = enableImmersiveMode;
+        refreshUI();
+        return this;
+    }
 }

+ 144 - 126
DialogX/src/main/java/com/kongzue/dialogx/dialogs/GuideDialog.java

@@ -23,6 +23,7 @@ import com.kongzue.dialogx.DialogX;
 import com.kongzue.dialogx.R;
 import com.kongzue.dialogx.interfaces.DialogLifecycleCallback;
 import com.kongzue.dialogx.interfaces.DialogXAnimInterface;
+import com.kongzue.dialogx.interfaces.DialogXRunnable;
 import com.kongzue.dialogx.interfaces.DialogXStyle;
 import com.kongzue.dialogx.interfaces.OnBackPressedListener;
 import com.kongzue.dialogx.interfaces.OnBackgroundMaskClickListener;
@@ -41,7 +42,7 @@ import java.util.HashMap;
  * @createTime: 2022/8/19 16:35
  */
 public class GuideDialog extends CustomDialog {
-    
+
     public enum STAGE_LIGHT_TYPE {
         RECTANGLE,      //矩形
         SQUARE_OUTSIDE, //方形(外围)
@@ -49,31 +50,31 @@ public class GuideDialog extends CustomDialog {
         CIRCLE_OUTSIDE, //圆形(外围)
         CIRCLE_INSIDE,  //圆形(内围)
     }
-    
+
     protected STAGE_LIGHT_TYPE stageLightType = STAGE_LIGHT_TYPE.CIRCLE_OUTSIDE;
     protected Drawable tipImage;
     protected float stageLightFilletRadius;     //舞台灯光部分的圆角
     protected Integer maskColor = null;
     protected OnDialogButtonClickListener<GuideDialog> onStageLightPathClickListener;
     protected int[] baseViewLocationCoordinateCompensation = new int[4];
-    
+
     protected GuideDialog() {
         super();
         enterAnimResId = R.anim.anim_dialogx_alpha_enter;
         exitAnimResId = R.anim.anim_dialogx_default_exit;
         this.alignViewGravity = Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL;
     }
-    
+
     public static GuideDialog build() {
         return new GuideDialog();
     }
-    
+
     public GuideDialog(View baseView, STAGE_LIGHT_TYPE stageLightType) {
         this();
         this.baseView(baseView);
         this.stageLightType = stageLightType;
     }
-    
+
     public GuideDialog(View baseView, STAGE_LIGHT_TYPE stageLightType, OnBindView<CustomDialog> onBindView, int alignBaseViewGravity) {
         this();
         this.baseView(baseView);
@@ -81,7 +82,7 @@ public class GuideDialog extends CustomDialog {
         this.onBindView = onBindView;
         this.alignViewGravity = alignBaseViewGravity;
     }
-    
+
     public GuideDialog(View baseView, STAGE_LIGHT_TYPE stageLightType, int tipImageResId, int alignBaseViewGravity) {
         this();
         this.baseView(baseView);
@@ -89,7 +90,7 @@ public class GuideDialog extends CustomDialog {
         this.stageLightType = stageLightType;
         this.alignViewGravity = alignBaseViewGravity;
     }
-    
+
     public GuideDialog(View baseView, STAGE_LIGHT_TYPE stageLightType, Bitmap tipImage, int alignBaseViewGravity) {
         this();
         this.baseView(baseView);
@@ -97,7 +98,7 @@ public class GuideDialog extends CustomDialog {
         this.stageLightType = stageLightType;
         this.alignViewGravity = alignBaseViewGravity;
     }
-    
+
     public GuideDialog(View baseView, STAGE_LIGHT_TYPE stageLightType, Drawable tipImage, int alignBaseViewGravity) {
         this();
         this.baseView(baseView);
@@ -105,328 +106,326 @@ public class GuideDialog extends CustomDialog {
         this.stageLightType = stageLightType;
         this.alignViewGravity = alignBaseViewGravity;
     }
-    
+
     public GuideDialog(int tipImageResId) {
         this();
         this.tipImage = getResources().getDrawable(tipImageResId);
     }
-    
+
     public GuideDialog(Bitmap tipImage) {
         this();
         this.tipImage = new BitmapDrawable(getResources(), tipImage);
     }
-    
+
     public GuideDialog(Drawable tipImage) {
         this();
         this.tipImage = tipImage;
     }
-    
+
     public GuideDialog(int tipImageResId, ALIGN align) {
         this();
         this.tipImage = getResources().getDrawable(tipImageResId);
         this.align = align;
     }
-    
+
     public GuideDialog(Bitmap tipImage, ALIGN align) {
         this();
         this.tipImage = new BitmapDrawable(getResources(), tipImage);
         this.align = align;
     }
-    
+
     public GuideDialog(Drawable tipImage, ALIGN align) {
         this();
         this.tipImage = tipImage;
         this.align = align;
     }
-    
+
     public GuideDialog(OnBindView<CustomDialog> onBindView) {
         this();
         this.onBindView = onBindView;
     }
-    
+
     public GuideDialog(OnBindView<CustomDialog> onBindView, ALIGN align) {
         this();
         this.onBindView = onBindView;
         this.align = align;
     }
-    
+
     public GuideDialog(View baseView, int tipImageResId) {
         this();
         this.baseView(baseView);
         this.tipImage = getResources().getDrawable(tipImageResId);
     }
-    
+
     public GuideDialog(View baseView, Bitmap tipImage) {
         this();
         this.baseView(baseView);
         this.tipImage = new BitmapDrawable(getResources(), tipImage);
     }
-    
+
     public GuideDialog(View baseView, Drawable tipImage) {
         this();
         this.baseView(baseView);
         this.tipImage = tipImage;
     }
-    
+
     public GuideDialog(View baseView, STAGE_LIGHT_TYPE stageLightType, int tipImageResId) {
         this();
         this.baseView(baseView);
         this.stageLightType = stageLightType;
         this.tipImage = getResources().getDrawable(tipImageResId);
     }
-    
+
     public GuideDialog(View baseView, STAGE_LIGHT_TYPE stageLightType, Bitmap tipImage) {
         this();
         this.baseView(baseView);
         this.stageLightType = stageLightType;
         this.tipImage = new BitmapDrawable(getResources(), tipImage);
     }
-    
+
     public GuideDialog(View baseView, STAGE_LIGHT_TYPE stageLightType, Drawable tipImage) {
         this();
         this.baseView(baseView);
         this.stageLightType = stageLightType;
         this.tipImage = tipImage;
     }
-    
+
     public GuideDialog(View baseView, int tipImageResId, int alignBaseViewGravity) {
         this();
         this.baseView(baseView);
         this.alignViewGravity = alignBaseViewGravity;
         this.tipImage = getResources().getDrawable(tipImageResId);
     }
-    
+
     public GuideDialog(View baseView, Bitmap tipImage, int alignBaseViewGravity) {
         this();
         this.baseView(baseView);
         this.alignViewGravity = alignBaseViewGravity;
         this.tipImage = new BitmapDrawable(getResources(), tipImage);
     }
-    
+
     public GuideDialog(View baseView, Drawable tipImage, int alignBaseViewGravity) {
         this();
         this.baseView(baseView);
         this.alignViewGravity = alignBaseViewGravity;
         this.tipImage = tipImage;
     }
-    
+
     //静态方法
     public static GuideDialog show(OnBindView<CustomDialog> onBindView) {
         GuideDialog guideDialog = new GuideDialog(onBindView);
         guideDialog.show();
         return guideDialog;
     }
-    
+
     public static GuideDialog show(OnBindView<CustomDialog> onBindView, ALIGN align) {
         GuideDialog guideDialog = new GuideDialog(onBindView);
         guideDialog.align = align;
         guideDialog.show();
         return guideDialog;
     }
-    
+
     public static GuideDialog show(int tipImageResId) {
         return new GuideDialog(tipImageResId).show();
     }
-    
+
     public static GuideDialog show(Bitmap tipImage) {
         return new GuideDialog(tipImage).show();
     }
-    
+
     public static GuideDialog show(Drawable tipImage) {
         return new GuideDialog(tipImage).show();
     }
-    
+
     public static GuideDialog show(int tipImageResId, ALIGN align) {
         GuideDialog guideDialog = new GuideDialog(tipImageResId, align);
         guideDialog.align = align;
         return guideDialog.show();
     }
-    
+
     public static GuideDialog show(Bitmap tipImage, ALIGN align) {
         GuideDialog guideDialog = new GuideDialog(tipImage, align);
         guideDialog.align = align;
         return guideDialog.show();
     }
-    
+
     public static GuideDialog show(Drawable tipImage, ALIGN align) {
         return new GuideDialog(tipImage, align).show();
     }
-    
+
     public static GuideDialog show(View baseView, STAGE_LIGHT_TYPE stageLightType) {
         return new GuideDialog(baseView, stageLightType).show();
     }
-    
+
     public static GuideDialog show(View baseView, STAGE_LIGHT_TYPE stageLightType, OnBindView<CustomDialog> onBindView, int alignBaseViewGravity) {
         return new GuideDialog(baseView, stageLightType, onBindView, alignBaseViewGravity).show();
     }
-    
+
     public static GuideDialog show(View baseView, STAGE_LIGHT_TYPE stageLightType, int tipImageResId, int alignBaseViewGravity) {
         return new GuideDialog(baseView, stageLightType, tipImageResId, alignBaseViewGravity).show();
     }
-    
+
     public static GuideDialog show(View baseView, STAGE_LIGHT_TYPE stageLightType, Bitmap tipImage, int alignBaseViewGravity) {
         return new GuideDialog(baseView, stageLightType, tipImage, alignBaseViewGravity).show();
     }
-    
+
     public static GuideDialog show(View baseView, STAGE_LIGHT_TYPE stageLightType, Drawable tipImage, int alignBaseViewGravity) {
         return new GuideDialog(baseView, stageLightType, tipImage, alignBaseViewGravity).show();
     }
-    
+
     public static GuideDialog show(View baseView, int tipImageResId) {
         return new GuideDialog(baseView, tipImageResId).show();
     }
-    
+
     public static GuideDialog show(View baseView, Bitmap tipImage) {
         return new GuideDialog(baseView, tipImage).show();
     }
-    
+
     public static GuideDialog show(View baseView, Drawable tipImage) {
         return new GuideDialog(baseView, tipImage).show();
     }
-    
+
     public static GuideDialog show(View baseView, STAGE_LIGHT_TYPE stageLightType, int tipImageResId) {
         return new GuideDialog(baseView, stageLightType, tipImageResId).show();
     }
-    
+
     public static GuideDialog show(View baseView, STAGE_LIGHT_TYPE stageLightType, Bitmap tipImage) {
         return new GuideDialog(baseView, stageLightType, tipImage).show();
     }
-    
+
     public static GuideDialog show(View baseView, STAGE_LIGHT_TYPE stageLightType, Drawable tipImage) {
         return new GuideDialog(baseView, stageLightType, tipImage).show();
     }
-    
+
     public static GuideDialog show(View baseView, int tipImageResId, int alignBaseViewGravity) {
         return new GuideDialog(baseView, tipImageResId, alignBaseViewGravity).show();
     }
-    
+
     public static GuideDialog show(View baseView, Bitmap tipImage, int alignBaseViewGravity) {
         return new GuideDialog(baseView, tipImage, alignBaseViewGravity).show();
     }
-    
+
     public static GuideDialog show(View baseView, Drawable tipImage, int alignBaseViewGravity) {
         return new GuideDialog(baseView, tipImage, alignBaseViewGravity).show();
     }
-    
+
     //执行方法
     public GuideDialog show() {
         super.show();
         return this;
     }
-    
+
     public GuideDialog show(Activity activity) {
         super.show(activity);
         return this;
     }
-    
+
     @Override
     public String dialogKey() {
         return getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")";
     }
-    
+
     public GuideDialog setDialogLifecycleCallback(DialogLifecycleCallback<CustomDialog> dialogLifecycleCallback) {
         this.dialogLifecycleCallback = dialogLifecycleCallback;
         if (isShow) dialogLifecycleCallback.onShow(me);
         return this;
     }
-    
+
     public GuideDialog setOnBackPressedListener(OnBackPressedListener<CustomDialog> onBackPressedListener) {
         this.onBackPressedListener = onBackPressedListener;
         refreshUI();
         return this;
     }
-    
+
     public GuideDialog setStyle(DialogXStyle style) {
         this.style = style;
         return this;
     }
-    
+
     public GuideDialog setTheme(DialogX.THEME theme) {
         this.theme = theme;
         return this;
     }
-    
+
     public GuideDialog setCancelable(boolean cancelable) {
         this.privateCancelable = cancelable ? BOOLEAN.TRUE : BOOLEAN.FALSE;
         refreshUI();
         return this;
     }
-    
+
     public GuideDialog.DialogImpl getDialogImpl() {
         return dialogImpl;
     }
-    
+
     public GuideDialog setCustomView(OnBindView<CustomDialog> onBindView) {
         this.onBindView = onBindView;
         refreshUI();
         return this;
     }
-    
+
     public GuideDialog removeCustomView() {
         this.onBindView.clean();
         refreshUI();
         return this;
     }
-    
+
     public GuideDialog setEnterAnimResId(int enterAnimResId) {
         this.enterAnimResId = enterAnimResId;
         return this;
     }
-    
+
     public GuideDialog setExitAnimResId(int exitAnimResId) {
         this.exitAnimResId = exitAnimResId;
         return this;
     }
-    
+
     public GuideDialog setAnimResId(int enterAnimResId, int exitAnimResId) {
         this.enterAnimResId = enterAnimResId;
         this.exitAnimResId = exitAnimResId;
         return this;
     }
-    
+
     public GuideDialog setAlign(ALIGN align) {
         this.align = align;
         return this;
     }
-    
+
     public GuideDialog setAutoUnsafePlacePadding(boolean autoUnsafePlacePadding) {
-        this.autoUnsafePlacePadding = autoUnsafePlacePadding;
-        refreshUI();
+        super.setAutoUnsafePlacePadding(autoUnsafePlacePadding);
         return this;
     }
-    
+
     public GuideDialog setFullScreen(boolean fullscreen) {
-        this.autoUnsafePlacePadding = !autoUnsafePlacePadding;
-        refreshUI();
+        super.setFullScreen(fullscreen);
         return this;
     }
-    
+
     public GuideDialog setMaskColor(@ColorInt int maskColor) {
         this.maskColor = maskColor;
         refreshUI();
         return this;
     }
-    
+
     public GuideDialog setEnterAnimDuration(long enterAnimDuration) {
         this.enterAnimDuration = enterAnimDuration;
         return this;
     }
-    
+
     public GuideDialog setExitAnimDuration(long exitAnimDuration) {
         this.exitAnimDuration = exitAnimDuration;
         return this;
     }
-    
+
     public GuideDialog setDialogImplMode(DialogX.IMPL_MODE dialogImplMode) {
         this.dialogImplMode = dialogImplMode;
         return this;
     }
-    
+
     public GuideDialog setBkgInterceptTouch(boolean bkgInterceptTouch) {
         this.bkgInterceptTouch = bkgInterceptTouch;
         return this;
     }
-    
+
     public GuideDialog setAlignBaseViewGravity(View baseView, int alignGravity) {
         this.baseView(baseView);
         this.alignViewGravity = alignGravity;
@@ -435,7 +434,7 @@ public class GuideDialog extends CustomDialog {
         setFullScreen(true);
         return this;
     }
-    
+
     public GuideDialog setAlignBaseViewGravity(View baseView) {
         this.baseView(baseView);
         baseViewLoc = new int[4];
@@ -443,7 +442,7 @@ public class GuideDialog extends CustomDialog {
         setFullScreen(true);
         return this;
     }
-    
+
     public GuideDialog setAlignBaseViewGravity(int alignGravity) {
         this.alignViewGravity = alignGravity;
         if (baseView() != null) {
@@ -453,44 +452,44 @@ public class GuideDialog extends CustomDialog {
         setFullScreen(true);
         return this;
     }
-    
+
     public GuideDialog setAlignBaseViewGravity(View baseView, int alignGravity, int marginLeft,
                                                int marginTop, int marginRight, int marginBottom) {
         this.marginRelativeBaseView = new int[]{marginLeft, marginTop, marginRight, marginBottom};
         return setAlignBaseViewGravity(baseView, alignGravity);
     }
-    
+
     public GuideDialog setBaseViewMargin(int[] marginRelativeBaseView) {
         this.marginRelativeBaseView = marginRelativeBaseView;
         return this;
     }
-    
+
     public GuideDialog setBaseViewMargin(int marginLeft, int marginTop,
                                          int marginRight, int marginBottom) {
         this.marginRelativeBaseView = new int[]{marginLeft, marginTop, marginRight, marginBottom};
         return this;
     }
-    
+
     public GuideDialog setBaseViewMarginLeft(int marginLeft) {
         this.marginRelativeBaseView[0] = marginLeft;
         return this;
     }
-    
+
     public GuideDialog setBaseViewMarginTop(int marginTop) {
         this.marginRelativeBaseView[1] = marginTop;
         return this;
     }
-    
+
     public GuideDialog setBaseViewMarginRight(int marginRight) {
         this.marginRelativeBaseView[2] = marginRight;
         return this;
     }
-    
+
     public GuideDialog setBaseViewMarginBottom(int marginBottom) {
         this.marginRelativeBaseView[3] = marginBottom;
         return this;
     }
-    
+
     /**
      * 设置对话框 UI 宽度(单位:像素)
      *
@@ -502,7 +501,7 @@ public class GuideDialog extends CustomDialog {
         refreshUI();
         return this;
     }
-    
+
     /**
      * 设置对话框 UI 高度(单位:像素)
      *
@@ -514,12 +513,12 @@ public class GuideDialog extends CustomDialog {
         refreshUI();
         return this;
     }
-    
+
     public GuideDialog setOnBackgroundMaskClickListener(OnBackgroundMaskClickListener<CustomDialog> onBackgroundMaskClickListener) {
         this.onBackgroundMaskClickListener = onBackgroundMaskClickListener;
         return this;
     }
-    
+
     @Override
     protected void onDialogShow() {
         super.onDialogShow();
@@ -527,9 +526,9 @@ public class GuideDialog extends CustomDialog {
             super.setMaskColor(maskColor == null ? getColor(R.color.black50) : maskColor);
         }
     }
-    
+
     View stageLightPathStub;
-    
+
     @Override
     protected void onDialogRefreshUI() {
         super.onDialogRefreshUI();
@@ -538,7 +537,7 @@ public class GuideDialog extends CustomDialog {
             getDialogImpl().boxCustom.setFocusableInTouchMode(false);
             getDialogImpl().boxCustom.setOnClickListener(null);
             getDialogImpl().boxCustom.setClickable(false);
-            
+
             ImageView imageView = new ImageView(getOwnActivity());
             imageView.setImageDrawable(tipImage);
             imageView.setAdjustViewBounds(true);
@@ -546,7 +545,7 @@ public class GuideDialog extends CustomDialog {
             onBindView = new OnBindView<CustomDialog>(imageView) {
                 @Override
                 public void onBind(CustomDialog dialog, View v) {
-                
+
                 }
             };
             onBindView.bindParent(getDialogImpl().boxCustom, me);
@@ -568,9 +567,9 @@ public class GuideDialog extends CustomDialog {
             }
         }
     }
-    
+
     int[] baseViewLocCache;
-    
+
     @Override
     protected void onGetBaseViewLoc(int[] baseViewLoc) {
         if (Arrays.equals(baseViewLoc, baseViewLocCache)) {
@@ -581,14 +580,14 @@ public class GuideDialog extends CustomDialog {
         }
         Bitmap bkg = Bitmap.createBitmap(getDialogImpl().boxRoot.getWidth(), getDialogImpl().boxRoot.getHeight(), Bitmap.Config.ARGB_8888);
         Canvas canvas = new Canvas(bkg);
-        
+
         int x = baseViewLoc[0] + baseViewLocationCoordinateCompensation[0];
         int y = baseViewLoc[1] + baseViewLocationCoordinateCompensation[1];
         int w = baseViewLoc[2] + baseViewLocationCoordinateCompensation[2];
         int h = baseViewLoc[3] + baseViewLocationCoordinateCompensation[3];
         int hW = w / 2;
         int hH = h / 2;
-        
+
         if (stageLightPathStub != null && (stageLightPathStub.getX() != x || stageLightPathStub.getY() != y)) {
             RelativeLayout.LayoutParams rLp = (RelativeLayout.LayoutParams) stageLightPathStub.getLayoutParams();
             if (rLp == null) {
@@ -601,7 +600,7 @@ public class GuideDialog extends CustomDialog {
             stageLightPathStub.setX(x);
             stageLightPathStub.setY(y);
         }
-        
+
         switch (stageLightType) {
             case CIRCLE_OUTSIDE: {
                 int r = (int) Math.sqrt(hW * hW + hH * hH);
@@ -630,14 +629,14 @@ public class GuideDialog extends CustomDialog {
         }
         stageLightPaint.setXfermode(null);
         canvas.drawColor(maskColor == null ? getColor(R.color.black50) : maskColor, PorterDuff.Mode.SRC_OUT);
-        
+
         BitmapDrawable bkgDrawable = new BitmapDrawable(getResources(), bkg);
         getDialogImpl().boxRoot.setBackground(bkgDrawable);
         baseViewLocCache = Arrays.copyOf(baseViewLoc, 4);
     }
-    
+
     Paint stageLightPaint;
-    
+
     private Paint getStageLightPaint() {
         if (stageLightPaint == null) {
             stageLightPaint = new Paint();
@@ -647,137 +646,137 @@ public class GuideDialog extends CustomDialog {
         }
         return stageLightPaint;
     }
-    
+
     public STAGE_LIGHT_TYPE getStageLightType() {
         return stageLightType;
     }
-    
+
     public GuideDialog setStageLightType(STAGE_LIGHT_TYPE stageLightType) {
         this.stageLightType = stageLightType;
         refreshUI();
         return this;
     }
-    
+
     public Drawable getTipImage() {
         return tipImage;
     }
-    
+
     public GuideDialog setTipImage(int tipImageResId) {
         this.tipImage = getResources().getDrawable(tipImageResId);
         refreshUI();
         return this;
     }
-    
+
     public GuideDialog setTipImage(Bitmap tipImage) {
         this.tipImage = new BitmapDrawable(getResources(), tipImage);
         refreshUI();
         return this;
     }
-    
+
     public GuideDialog setTipImage(Drawable tipImage) {
         this.tipImage = tipImage;
         refreshUI();
         return this;
     }
-    
+
     public float getStageLightFilletRadius() {
         return stageLightFilletRadius;
     }
-    
+
     public GuideDialog setStageLightFilletRadius(float stageLightFilletRadius) {
         this.stageLightFilletRadius = stageLightFilletRadius;
         refreshUI();
         return this;
     }
-    
+
     public OnDialogButtonClickListener<GuideDialog> getOnStageLightPathClickListener() {
         return onStageLightPathClickListener;
     }
-    
+
     public GuideDialog setOnStageLightPathClickListener(OnDialogButtonClickListener<GuideDialog> onStageLightPathClickListener) {
         this.onStageLightPathClickListener = onStageLightPathClickListener;
         refreshUI();
         return this;
     }
-    
+
     public DialogXAnimInterface<CustomDialog> getDialogXAnimImpl() {
         return dialogXAnimImpl;
     }
-    
+
     public GuideDialog setDialogXAnimImpl(DialogXAnimInterface<CustomDialog> dialogXAnimImpl) {
         this.dialogXAnimImpl = dialogXAnimImpl;
         return this;
     }
-    
+
     public GuideDialog setRootPadding(int padding) {
         this.screenPaddings = new int[]{padding, padding, padding, padding};
         refreshUI();
         return this;
     }
-    
+
     public GuideDialog setRootPadding(int paddingLeft, int paddingTop, int paddingRight, int paddingBottom) {
         this.screenPaddings = new int[]{paddingLeft, paddingTop, paddingRight, paddingBottom};
         refreshUI();
         return this;
     }
-    
+
     public int[] getBaseViewLocationCoordinateCompensation() {
         return baseViewLocationCoordinateCompensation;
     }
-    
+
     public GuideDialog setBaseViewLocationCoordinateCompensation(int[] baseViewLocationCoordinateCompensation) {
         this.baseViewLocationCoordinateCompensation = baseViewLocationCoordinateCompensation;
         return this;
     }
-    
+
     public GuideDialog setBaseViewLocationCoordinateCompensation(int px) {
         this.baseViewLocationCoordinateCompensation = new int[]{px, px, px, px};
         refreshUI();
         return this;
     }
-    
+
     public GuideDialog setBaseViewLocationCoordinateCompensation(int pxX, int pxY, int pxR, int pxB) {
         this.baseViewLocationCoordinateCompensation = new int[]{pxX, pxY, pxR, pxB};
         refreshUI();
         return this;
     }
-    
+
     public GuideDialog setBaseViewLocationCoordinateCompensationLeft(int pxX) {
         this.baseViewLocationCoordinateCompensation[0] = pxX;
         refreshUI();
         return this;
     }
-    
+
     public GuideDialog setBaseViewLocationCoordinateCompensationTop(int pxY) {
         this.baseViewLocationCoordinateCompensation[1] = pxY;
         refreshUI();
         return this;
     }
-    
+
     public GuideDialog setBaseViewLocationCoordinateCompensationRight(int pxR) {
         this.baseViewLocationCoordinateCompensation[2] = pxR;
         refreshUI();
         return this;
     }
-    
+
     public GuideDialog setBaseViewLocationCoordinateCompensationBottom(int pxB) {
         this.baseViewLocationCoordinateCompensation[3] = pxB;
         refreshUI();
         return this;
     }
-    
+
     public int getBaseViewLocationCoordinateCompensationLeft() {
         return baseViewLocationCoordinateCompensation[0];
     }
-    
+
     public int getBaseViewLocationCoordinateCompensationTop() {
         return baseViewLocationCoordinateCompensation[1];
     }
-    
+
     public int getBaseViewLocationCoordinateCompensationRight() {
         return baseViewLocationCoordinateCompensation[2];
     }
-    
+
     public int getBaseViewLocationCoordinateCompensationBottom() {
         return baseViewLocationCoordinateCompensation[3];
     }
@@ -787,4 +786,23 @@ public class GuideDialog extends CustomDialog {
         data.put(key, obj);
         return this;
     }
+
+    public GuideDialog onShow(DialogXRunnable<CustomDialog> dialogXRunnable) {
+        onShowRunnable = dialogXRunnable;
+        if (isShow() && onShowRunnable != null) {
+            onShowRunnable.run(this);
+        }
+        return this;
+    }
+
+    public GuideDialog onDismiss(DialogXRunnable<CustomDialog> dialogXRunnable) {
+        onDismissRunnable = dialogXRunnable;
+        return this;
+    }
+
+    public GuideDialog setEnableImmersiveMode(boolean enableImmersiveMode) {
+        this.enableImmersiveMode = enableImmersiveMode;
+        refreshUI();
+        return this;
+    }
 }

+ 20 - 0
DialogX/src/main/java/com/kongzue/dialogx/dialogs/InputDialog.java

@@ -12,6 +12,7 @@ import com.kongzue.dialogx.DialogX;
 import com.kongzue.dialogx.R;
 import com.kongzue.dialogx.interfaces.DialogLifecycleCallback;
 import com.kongzue.dialogx.interfaces.DialogXAnimInterface;
+import com.kongzue.dialogx.interfaces.DialogXRunnable;
 import com.kongzue.dialogx.interfaces.DialogXStyle;
 import com.kongzue.dialogx.interfaces.OnBackPressedListener;
 import com.kongzue.dialogx.interfaces.OnBackgroundMaskClickListener;
@@ -685,4 +686,23 @@ public class InputDialog extends MessageDialog {
         data.put(key, obj);
         return this;
     }
+
+    public InputDialog onShow(DialogXRunnable<MessageDialog> dialogXRunnable) {
+        onShowRunnable = dialogXRunnable;
+        if (isShow() && onShowRunnable != null) {
+            onShowRunnable.run(this);
+        }
+        return this;
+    }
+
+    public InputDialog onDismiss(DialogXRunnable<MessageDialog> dialogXRunnable) {
+        onDismissRunnable = dialogXRunnable;
+        return this;
+    }
+
+    public InputDialog setEnableImmersiveMode(boolean enableImmersiveMode) {
+        this.enableImmersiveMode = enableImmersiveMode;
+        refreshUI();
+        return this;
+    }
 }

+ 26 - 2
DialogX/src/main/java/com/kongzue/dialogx/dialogs/MessageDialog.java

@@ -44,6 +44,7 @@ import com.kongzue.dialogx.interfaces.BlurViewType;
 import com.kongzue.dialogx.interfaces.DialogConvertViewInterface;
 import com.kongzue.dialogx.interfaces.DialogLifecycleCallback;
 import com.kongzue.dialogx.interfaces.DialogXAnimInterface;
+import com.kongzue.dialogx.interfaces.DialogXRunnable;
 import com.kongzue.dialogx.interfaces.DialogXStyle;
 import com.kongzue.dialogx.interfaces.OnBackPressedListener;
 import com.kongzue.dialogx.interfaces.OnBackgroundMaskClickListener;
@@ -506,6 +507,7 @@ public class MessageDialog extends BaseDialog {
                 return;
             }
 
+            boxRoot.setAutoUnsafePlacePadding(isEnableImmersiveMode());
             //修改下划线颜色
             if (inputInfo != null && inputInfo.getBottomLineColor() != null) {
                 txtInput.getBackground().mutate().setColorFilter(inputInfo.getBottomLineColor(), PorterDuff.Mode.SRC_ATOP);
@@ -1454,7 +1456,7 @@ public class MessageDialog extends BaseDialog {
      * }
      * }
      */
-    public void onShow(MessageDialog dialog) {
+    protected void onShow(MessageDialog dialog) {
 
     }
 
@@ -1478,7 +1480,7 @@ public class MessageDialog extends BaseDialog {
      * }
      */
     //用于使用 new 构建实例时,override 的生命周期事件
-    public void onDismiss(MessageDialog dialog) {
+    protected void onDismiss(MessageDialog dialog) {
 
     }
 
@@ -1487,4 +1489,26 @@ public class MessageDialog extends BaseDialog {
         data.put(key, obj);
         return this;
     }
+
+    public MessageDialog onShow(DialogXRunnable<MessageDialog> dialogXRunnable) {
+        onShowRunnable = dialogXRunnable;
+        if (isShow() && onShowRunnable != null) {
+            onShowRunnable.run(this);
+            if (isShow() && onShowRunnable != null) {
+                onShowRunnable.run(this);
+            }
+        }
+        return this;
+    }
+
+    public MessageDialog onDismiss(DialogXRunnable<MessageDialog> dialogXRunnable) {
+        onDismissRunnable = dialogXRunnable;
+        return this;
+    }
+
+    public MessageDialog setEnableImmersiveMode(boolean enableImmersiveMode) {
+        this.enableImmersiveMode = enableImmersiveMode;
+        refreshUI();
+        return this;
+    }
 }

+ 23 - 2
DialogX/src/main/java/com/kongzue/dialogx/dialogs/PopMenu.java

@@ -33,6 +33,7 @@ import com.kongzue.dialogx.interfaces.BlurViewType;
 import com.kongzue.dialogx.interfaces.DialogConvertViewInterface;
 import com.kongzue.dialogx.interfaces.DialogLifecycleCallback;
 import com.kongzue.dialogx.interfaces.DialogXAnimInterface;
+import com.kongzue.dialogx.interfaces.DialogXRunnable;
 import com.kongzue.dialogx.interfaces.DialogXStyle;
 import com.kongzue.dialogx.interfaces.MenuItemLayoutRefreshCallback;
 import com.kongzue.dialogx.interfaces.OnBackPressedListener;
@@ -558,6 +559,7 @@ public class PopMenu extends BaseDialog {
             if (boxRoot == null || getOwnActivity() == null) {
                 return;
             }
+            boxRoot.setAutoUnsafePlacePadding(isEnableImmersiveMode());
             boxRoot.setRootPadding(screenPaddings[0], screenPaddings[1], screenPaddings[2], screenPaddings[3]);
             if (listMenu.getAdapter() == null) {
                 listMenu.setAdapter(menuListAdapter);
@@ -1257,7 +1259,7 @@ public class PopMenu extends BaseDialog {
      * }
      * }
      */
-    public void onShow(PopMenu dialog) {
+    protected void onShow(PopMenu dialog) {
 
     }
 
@@ -1281,7 +1283,7 @@ public class PopMenu extends BaseDialog {
      * }
      */
     //用于使用 new 构建实例时,override 的生命周期事件
-    public void onDismiss(PopMenu dialog) {
+    protected void onDismiss(PopMenu dialog) {
 
     }
 
@@ -1313,4 +1315,23 @@ public class PopMenu extends BaseDialog {
         data.put(key, obj);
         return this;
     }
+
+    public PopMenu onShow(DialogXRunnable<PopMenu> dialogXRunnable) {
+        onShowRunnable = dialogXRunnable;
+        if (isShow() && onShowRunnable != null) {
+            onShowRunnable.run(this);
+        }
+        return this;
+    }
+
+    public PopMenu onDismiss(DialogXRunnable<PopMenu> dialogXRunnable) {
+        onDismissRunnable = dialogXRunnable;
+        return this;
+    }
+
+    public PopMenu setEnableImmersiveMode(boolean enableImmersiveMode) {
+        this.enableImmersiveMode = enableImmersiveMode;
+        refreshUI();
+        return this;
+    }
 }

+ 19 - 5
DialogX/src/main/java/com/kongzue/dialogx/dialogs/PopNotification.java

@@ -34,6 +34,7 @@ import com.kongzue.dialogx.interfaces.BlurViewType;
 import com.kongzue.dialogx.interfaces.DialogConvertViewInterface;
 import com.kongzue.dialogx.interfaces.DialogLifecycleCallback;
 import com.kongzue.dialogx.interfaces.DialogXAnimInterface;
+import com.kongzue.dialogx.interfaces.DialogXRunnable;
 import com.kongzue.dialogx.interfaces.DialogXStyle;
 import com.kongzue.dialogx.interfaces.NoTouchInterface;
 import com.kongzue.dialogx.interfaces.OnBindView;
@@ -678,7 +679,7 @@ public class PopNotification extends BaseDialog implements NoTouchInterface {
 
         @Override
         public void refreshView() {
-            if (boxRoot == null || getOwnActivity() == null) {
+            if (boxRoot == null) {
                 return;
             }
             boxRoot.setRootPadding(screenPaddings[0], screenPaddings[1], screenPaddings[2], screenPaddings[3]);
@@ -859,7 +860,7 @@ public class PopNotification extends BaseDialog implements NoTouchInterface {
                 dialogXAnimImpl = new DialogXAnimInterface<PopNotification>() {
                     @Override
                     public void doShowAnim(PopNotification dialog, ViewGroup dialogBodyView) {
-                        Animation enterAnim = AnimationUtils.loadAnimation(getOwnActivity(), enterAnimResId == 0 ? R.anim.anim_dialogx_notification_enter : enterAnimResId);
+                        Animation enterAnim = AnimationUtils.loadAnimation(getApplicationContext(), enterAnimResId == 0 ? R.anim.anim_dialogx_notification_enter : enterAnimResId);
                         long enterAnimDuration = getEnterAnimationDuration(enterAnim);
                         enterAnim.setInterpolator(new DecelerateInterpolator(2f));
                         enterAnim.setDuration(enterAnimDuration);
@@ -875,7 +876,7 @@ public class PopNotification extends BaseDialog implements NoTouchInterface {
 
                     @Override
                     public void doExitAnim(PopNotification dialog, ViewGroup dialogBodyView) {
-                        Animation exitAnim = AnimationUtils.loadAnimation(getOwnActivity() == null ? boxRoot.getContext() : getOwnActivity(), exitAnimResId == 0 ? R.anim.anim_dialogx_notification_exit : exitAnimResId);
+                        Animation exitAnim = AnimationUtils.loadAnimation(getApplicationContext() == null ? boxRoot.getContext() : getApplicationContext(), exitAnimResId == 0 ? R.anim.anim_dialogx_notification_exit : exitAnimResId);
                         long exitAnimDuration = getExitAnimationDuration(exitAnim);
                         exitAnim.setDuration(exitAnimDuration);
                         exitAnim.setFillAfter(true);
@@ -1479,7 +1480,7 @@ public class PopNotification extends BaseDialog implements NoTouchInterface {
      * }
      * }
      */
-    public void onShow(PopNotification dialog) {
+    protected void onShow(PopNotification dialog) {
 
     }
 
@@ -1503,7 +1504,7 @@ public class PopNotification extends BaseDialog implements NoTouchInterface {
      * }
      */
     //用于使用 new 构建实例时,override 的生命周期事件
-    public void onDismiss(PopNotification dialog) {
+    protected void onDismiss(PopNotification dialog) {
 
     }
 
@@ -1512,4 +1513,17 @@ public class PopNotification extends BaseDialog implements NoTouchInterface {
         data.put(key, obj);
         return this;
     }
+
+    public PopNotification onShow(DialogXRunnable<PopNotification> dialogXRunnable) {
+        onShowRunnable = dialogXRunnable;
+        if (isShow() && onShowRunnable != null) {
+            onShowRunnable.run(this);
+        }
+        return this;
+    }
+
+    public PopNotification onDismiss(DialogXRunnable<PopNotification> dialogXRunnable) {
+        onDismissRunnable = dialogXRunnable;
+        return this;
+    }
 }

+ 16 - 2
DialogX/src/main/java/com/kongzue/dialogx/dialogs/PopTip.java

@@ -32,6 +32,7 @@ import com.kongzue.dialogx.interfaces.BlurViewType;
 import com.kongzue.dialogx.interfaces.DialogConvertViewInterface;
 import com.kongzue.dialogx.interfaces.DialogLifecycleCallback;
 import com.kongzue.dialogx.interfaces.DialogXAnimInterface;
+import com.kongzue.dialogx.interfaces.DialogXRunnable;
 import com.kongzue.dialogx.interfaces.DialogXStyle;
 import com.kongzue.dialogx.interfaces.NoTouchInterface;
 import com.kongzue.dialogx.interfaces.OnBackPressedListener;
@@ -1302,7 +1303,7 @@ public class PopTip extends BaseDialog implements NoTouchInterface {
      * }
      * }
      */
-    public void onShow(PopTip dialog) {
+    protected void onShow(PopTip dialog) {
 
     }
 
@@ -1326,7 +1327,7 @@ public class PopTip extends BaseDialog implements NoTouchInterface {
      * }
      */
     //用于使用 new 构建实例时,override 的生命周期事件
-    public void onDismiss(PopTip dialog) {
+    protected void onDismiss(PopTip dialog) {
 
     }
 
@@ -1341,4 +1342,17 @@ public class PopTip extends BaseDialog implements NoTouchInterface {
         data.put(key, obj);
         return this;
     }
+
+    public PopTip onShow(DialogXRunnable<PopTip> dialogXRunnable) {
+        onShowRunnable = dialogXRunnable;
+        if (isShow() && onShowRunnable != null) {
+            onShowRunnable.run(this);
+        }
+        return this;
+    }
+
+    public PopTip onDismiss(DialogXRunnable<PopTip> dialogXRunnable) {
+        onDismissRunnable = dialogXRunnable;
+        return this;
+    }
 }

+ 53 - 33
DialogX/src/main/java/com/kongzue/dialogx/dialogs/TipDialog.java

@@ -4,6 +4,7 @@ import android.app.Activity;
 
 import com.kongzue.dialogx.DialogX;
 import com.kongzue.dialogx.interfaces.DialogXAnimInterface;
+import com.kongzue.dialogx.interfaces.DialogXRunnable;
 import com.kongzue.dialogx.interfaces.OnBackPressedListener;
 import com.kongzue.dialogx.interfaces.OnBackgroundMaskClickListener;
 
@@ -17,17 +18,17 @@ import java.util.HashMap;
  * @createTime: 2020/9/28 23:53
  */
 public class TipDialog extends WaitDialog {
-    
+
     /**
      * 参数 duration 使用此值,或小于 0 的任意整数时,
      * TipDialog 将不自动关闭
      */
     public static final int NO_AUTO_DISMISS = -1;
-    
+
     protected TipDialog() {
         super();
     }
-    
+
     public static WaitDialog show(int messageResId) {
         boolean noInstance = noInstance();
         if (noInstance) instanceBuild();
@@ -35,7 +36,7 @@ public class TipDialog extends WaitDialog {
         showWithInstance(noInstance);
         return me();
     }
-    
+
     public static WaitDialog show(Activity activity, int messageResId) {
         boolean noInstance = noInstance(activity);
         if (noInstance) instanceBuild();
@@ -44,7 +45,7 @@ public class TipDialog extends WaitDialog {
         showWithInstance(noInstance, activity);
         return instance;
     }
-    
+
     public static WaitDialog show(CharSequence message) {
         boolean noInstance = noInstance();
         if (noInstance) instanceBuild();
@@ -52,7 +53,7 @@ public class TipDialog extends WaitDialog {
         showWithInstance(noInstance);
         return me();
     }
-    
+
     public static WaitDialog show(Activity activity, CharSequence message) {
         boolean noInstance = noInstance(activity);
         if (noInstance) instanceBuild();
@@ -61,7 +62,7 @@ public class TipDialog extends WaitDialog {
         if (noInstance) showWithInstance(noInstance, activity);
         return instance;
     }
-    
+
     public static WaitDialog show(int messageResId, TYPE tip) {
         boolean noInstance = noInstance();
         if (noInstance) instanceBuild();
@@ -69,7 +70,7 @@ public class TipDialog extends WaitDialog {
         showWithInstance(noInstance);
         return me();
     }
-    
+
     public static WaitDialog show(Activity activity, int messageResId, TYPE tip) {
         boolean noInstance = noInstance(activity);
         if (noInstance) instanceBuild();
@@ -78,16 +79,16 @@ public class TipDialog extends WaitDialog {
         if (noInstance) showWithInstance(noInstance, activity);
         return instance;
     }
-    
+
     public static WaitDialog show(CharSequence message, TYPE tip) {
         boolean noInstance = noInstance();
-        log("noInstance:"+noInstance);
+        log("noInstance:" + noInstance);
         if (noInstance) instanceBuild();
         me().setTip(message, tip);
         showWithInstance(noInstance);
         return me();
     }
-    
+
     public static WaitDialog show(Activity activity, CharSequence message, TYPE tip) {
         boolean noInstance = noInstance(activity);
         if (noInstance) instanceBuild();
@@ -96,7 +97,7 @@ public class TipDialog extends WaitDialog {
         if (noInstance) showWithInstance(noInstance, activity);
         return instance;
     }
-    
+
     public static WaitDialog show(int messageResId, TYPE tip, long duration) {
         boolean noInstance = noInstance();
         if (noInstance) instanceBuild();
@@ -105,7 +106,7 @@ public class TipDialog extends WaitDialog {
         showWithInstance(noInstance);
         return me();
     }
-    
+
     public static WaitDialog show(Activity activity, int messageResId, TYPE tip, long duration) {
         boolean noInstance = noInstance(activity);
         if (noInstance) instanceBuild();
@@ -115,7 +116,7 @@ public class TipDialog extends WaitDialog {
         if (noInstance) showWithInstance(noInstance, activity);
         return instance;
     }
-    
+
     public static WaitDialog show(CharSequence message, TYPE tip, long duration) {
         boolean noInstance = noInstance();
         if (noInstance) instanceBuild();
@@ -124,7 +125,7 @@ public class TipDialog extends WaitDialog {
         showWithInstance(noInstance);
         return me();
     }
-    
+
     public static WaitDialog show(Activity activity, CharSequence message, TYPE tip, long duration) {
         boolean noInstance = noInstance(activity);
         if (noInstance) instanceBuild();
@@ -134,12 +135,12 @@ public class TipDialog extends WaitDialog {
         if (noInstance) showWithInstance(noInstance, activity);
         return instance;
     }
-    
+
     @Override
     public String dialogKey() {
         return getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")";
     }
-    
+
     protected static void showWithInstance(boolean noInstance) {
         if (noInstance) {
             me().show();
@@ -148,7 +149,7 @@ public class TipDialog extends WaitDialog {
             me().showTip(me().readyTipType);
         }
     }
-    
+
     protected static void showWithInstance(boolean noInstance, Activity activity) {
         if (noInstance) {
             me().show(activity);
@@ -157,81 +158,81 @@ public class TipDialog extends WaitDialog {
             me().showTip(me().readyTipType);
         }
     }
-    
+
     public TipDialog setMaxWidth(int maxWidth) {
         this.maxWidth = maxWidth;
         refreshUI();
         return this;
     }
-    
+
     public TipDialog setMaxHeight(int maxHeight) {
         this.maxHeight = maxHeight;
         refreshUI();
         return this;
     }
-    
+
     public TipDialog setMinHeight(int minHeight) {
         this.minHeight = minHeight;
         refreshUI();
         return this;
     }
-    
+
     public TipDialog setMinWidth(int minWidth) {
         this.minWidth = minWidth;
         refreshUI();
         return this;
     }
-    
+
     public TipDialog setDialogImplMode(DialogX.IMPL_MODE dialogImplMode) {
         this.dialogImplMode = dialogImplMode;
         return this;
     }
-    
+
     public boolean isBkgInterceptTouch() {
         return bkgInterceptTouch;
     }
-    
+
     public TipDialog setBkgInterceptTouch(boolean bkgInterceptTouch) {
         this.bkgInterceptTouch = bkgInterceptTouch;
         return this;
     }
-    
+
     public OnBackgroundMaskClickListener<WaitDialog> getOnBackgroundMaskClickListener() {
         return onBackgroundMaskClickListener;
     }
-    
+
     public TipDialog setOnBackgroundMaskClickListener(OnBackgroundMaskClickListener<WaitDialog> onBackgroundMaskClickListener) {
         this.onBackgroundMaskClickListener = onBackgroundMaskClickListener;
         return this;
     }
-    
+
     public TipDialog setRadius(float radiusPx) {
         backgroundRadius = radiusPx;
         refreshUI();
         return this;
     }
-    
+
     public float getRadius() {
         return backgroundRadius;
     }
-    
+
     public TipDialog setDialogXAnimImpl(DialogXAnimInterface<WaitDialog> dialogXAnimImpl) {
         this.dialogXAnimImpl = dialogXAnimImpl;
         return this;
     }
-    
+
     public TipDialog setOnBackPressedListener(OnBackPressedListener<WaitDialog> onBackPressedListener) {
         this.onBackPressedListener = onBackPressedListener;
         refreshUI();
         return this;
     }
-    
+
     public TipDialog setRootPadding(int padding) {
         this.screenPaddings = new int[]{padding, padding, padding, padding};
         refreshUI();
         return this;
     }
-    
+
     public TipDialog setRootPadding(int paddingLeft, int paddingTop, int paddingRight, int paddingBottom) {
         this.screenPaddings = new int[]{paddingLeft, paddingTop, paddingRight, paddingBottom};
         refreshUI();
@@ -243,4 +244,23 @@ public class TipDialog extends WaitDialog {
         data.put(key, obj);
         return this;
     }
+
+    public TipDialog onShow(DialogXRunnable<WaitDialog> dialogXRunnable) {
+        onShowRunnable = dialogXRunnable;
+        if (isShow() && onShowRunnable != null) {
+            onShowRunnable.run(this);
+        }
+        return this;
+    }
+
+    public TipDialog onDismiss(DialogXRunnable<WaitDialog> dialogXRunnable) {
+        onDismissRunnable = dialogXRunnable;
+        return this;
+    }
+
+    public TipDialog setEnableImmersiveMode(boolean enableImmersiveMode) {
+        this.enableImmersiveMode = enableImmersiveMode;
+        refreshUI();
+        return this;
+    }
 }

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

@@ -7,6 +7,7 @@ import android.content.Context;
 import android.graphics.Color;
 import android.graphics.Outline;
 import android.graphics.drawable.GradientDrawable;
+import android.os.Build;
 import android.os.Handler;
 import android.os.Looper;
 import android.view.View;
@@ -374,9 +375,6 @@ public class WaitDialog extends BaseDialog {
 
                             onDialogShow();
                             getDialogLifecycleCallback().onShow(WaitDialog.this);
-                            if (onShowRunnable != null) {
-                                onShowRunnable.run(WaitDialog.this);
-                            }
                             setLifecycleState(Lifecycle.State.RESUMED);
                         }
                     });
@@ -422,6 +420,7 @@ public class WaitDialog extends BaseDialog {
             if (boxRoot == null || getOwnActivity() == null) {
                 return;
             }
+            boxRoot.setAutoUnsafePlacePadding(isEnableImmersiveMode());
             boxRoot.setRootPadding(screenPaddings[0], screenPaddings[1], screenPaddings[2], screenPaddings[3]);
 
             bkg.setMaxWidth(getMaxWidth());
@@ -700,9 +699,6 @@ public class WaitDialog extends BaseDialog {
     public void cleanInstance() {
         isShow = false;
         getDialogLifecycleCallback().onDismiss(WaitDialog.this);
-        if (onDismissRunnable != null) {
-            onDismissRunnable.run(WaitDialog.this);
-        }
         if (dialogImpl != null) dialogImpl.clear();
         dialogImpl = null;
         if (dialogView != null) dialogView.clear();
@@ -1205,11 +1201,11 @@ public class WaitDialog extends BaseDialog {
         return this;
     }
 
-    DialogXRunnable<WaitDialog> onShowRunnable;
-    DialogXRunnable<WaitDialog> onDismissRunnable;
-
     public WaitDialog onShow(DialogXRunnable<WaitDialog> dialogXRunnable) {
         onShowRunnable = dialogXRunnable;
+        if (isShow() && onShowRunnable != null) {
+            onShowRunnable.run(this);
+        }
         return this;
     }
 
@@ -1223,4 +1219,10 @@ public class WaitDialog extends BaseDialog {
         data.put(key, obj);
         return this;
     }
+
+    public WaitDialog setEnableImmersiveMode(boolean enableImmersiveMode) {
+        this.enableImmersiveMode = enableImmersiveMode;
+        refreshUI();
+        return this;
+    }
 }

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

@@ -78,6 +78,9 @@ public abstract class BaseDialog implements LifecycleOwner {
     private WeakReference<DialogListBuilder> dialogListBuilder;
     protected LifecycleRegistry lifecycle = new LifecycleRegistry(this);
     protected Map<String, Object> data;
+    protected DialogXRunnable onShowRunnable;
+    protected DialogXRunnable onDismissRunnable;
+    protected boolean enableImmersiveMode = true;   //沉浸式适配
 
     public enum BUTTON_SELECT_RESULT {
         NONE,           //未做出选择
@@ -388,7 +391,7 @@ public abstract class BaseDialog implements LifecycleOwner {
         if (baseDialog.dialogView != null) {
             baseDialog.dialogView.clear();
         }
-
+        baseDialog.onDialogDismiss();
         switch (baseDialog.dialogImplMode) {
             case WINDOW:
                 WindowUtil.dismiss(dialogView);
@@ -520,6 +523,7 @@ public abstract class BaseDialog implements LifecycleOwner {
         enterAnimDuration = DialogX.enterAnimDuration;
         exitAnimDuration = DialogX.exitAnimDuration;
         autoShowInputKeyboard = DialogX.autoShowInputKeyboard;
+        enableImmersiveMode = DialogX.enableImmersiveMode;
     }
 
     public abstract boolean isCancelable();
@@ -920,6 +924,10 @@ public abstract class BaseDialog implements LifecycleOwner {
     public abstract <D extends BaseDialog> D show();
 
     protected void onDialogShow() {
+        if (onShowRunnable != null) onShowRunnable.run(this);
+    }
+
+    protected void refreshUI() {
     }
 
     protected void onDialogInit() {
@@ -928,6 +936,10 @@ public abstract class BaseDialog implements LifecycleOwner {
     protected void onDialogRefreshUI() {
     }
 
+    protected void onDialogDismiss() {
+        if (onDismissRunnable != null) onDismissRunnable.run(this);
+    }
+
     @NonNull
     @Override
     public Lifecycle getLifecycle() {
@@ -1035,4 +1047,14 @@ public abstract class BaseDialog implements LifecycleOwner {
         data.put(key, obj);
         return this;
     }
+
+    public boolean isEnableImmersiveMode() {
+        return enableImmersiveMode;
+    }
+
+    public BaseDialog setEnableImmersiveMode(boolean enableImmersiveMode) {
+        this.enableImmersiveMode = enableImmersiveMode;
+        refreshUI();
+        return this;
+    }
 }

+ 12 - 0
DialogX/src/main/java/com/kongzue/dialogx/util/DialogXValueAnimator.java

@@ -164,4 +164,16 @@ public class DialogXValueAnimator {
     public Interpolator getInterpolator() {
         return interpolator;
     }
+
+    public boolean isRunning() {
+        return isRunning;
+    }
+
+    public int getRepeatCount() {
+        return repeatCount;
+    }
+
+    public int getCurrentRepeatCount() {
+        return currentRepeatCount;
+    }
 }

+ 6 - 6
DialogX/src/main/java/com/kongzue/dialogx/util/views/DialogXBaseRelativeLayout.java

@@ -112,7 +112,7 @@ public class DialogXBaseRelativeLayout extends RelativeLayout {
                     }
                     // TODO Fix bug #370 在这里对这个重新做下处理,未详细测试,比如键盘弹起时的情况
                     Insets systemBarInsets = null;
-                    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && getRootWindowInsets()!=null) {
+                    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && getRootWindowInsets() != null) {
                         WindowInsetsCompat windowInsetsCompat = WindowInsetsCompat.toWindowInsetsCompat(getRootWindowInsets());
                         boolean navigationBarsVisible = windowInsetsCompat.isVisible(WindowInsetsCompat.Type.navigationBars());
                         boolean imeVisible = windowInsetsCompat.isVisible(WindowInsetsCompat.Type.ime());
@@ -128,10 +128,10 @@ public class DialogXBaseRelativeLayout extends RelativeLayout {
                         }
                     }
                     if (systemBarInsets != null) {
-                        unsafePlace.left = Math.max( systemBarInsets.left,start);
-                        unsafePlace.top = Math.max(systemBarInsets.top,top);
-                        unsafePlace.right = Math.max(systemBarInsets.right,end);
-                        unsafePlace.bottom = Math.max(systemBarInsets.bottom,bottom);
+                        unsafePlace.left = Math.max(systemBarInsets.left, start);
+                        unsafePlace.top = Math.max(systemBarInsets.top, top);
+                        unsafePlace.right = Math.max(systemBarInsets.right, end);
+                        unsafePlace.bottom = Math.max(systemBarInsets.bottom, bottom);
                     } else {
                         unsafePlace.left = start;
                         unsafePlace.top = top;
@@ -177,7 +177,7 @@ public class DialogXBaseRelativeLayout extends RelativeLayout {
         }
         if (isAutoUnsafePlacePadding()) {
             log("  KONGZUE DEBUG DIALOGX: root.setPadding t=" + top + " b=" + bottom);
-            setPadding(start, top, end, bottom);
+            setPadding(DialogX.ignoreUnsafeInsetsHorizontal ? 0 : start, top, DialogX.ignoreUnsafeInsetsHorizontal ? 0 : end, bottom);
         }
     }
 

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

@@ -26,11 +26,11 @@ public class App extends BaseApp<App> {
         DialogX.useHaptic = true;
 
         //演示仅覆写一个设置,不覆写其他设置:
-        DialogX.globalStyle = new MaterialStyle(){
+        DialogX.globalStyle = new MaterialStyle() {
             @Override
             public PopTipSettings popTipSettings() {
                 //DefaultPopTipSettings 是主题中默认的 PopTip 设置,以下演示仅覆写其中的 align 设置
-                return new DefaultPopTipSettings(){
+                return new DefaultPopTipSettings() {
                     @Override
                     public ALIGN align() {
                         return ALIGN.BOTTOM;
@@ -42,7 +42,8 @@ public class App extends BaseApp<App> {
         DialogX.globalTheme = DialogX.THEME.AUTO;
         DialogX.onlyOnePopTip = false;
         DialogX.DEBUGMODE = BuildConfig.DEBUG;
-    
+        //DialogX.ignoreUnsafeInsetsHorizontal = true;
+
         //以下代码用于测试后台 Service 启动对话框
 //        DialogX.implIMPLMode = DialogX.IMPL_MODE.FLOATING_ACTIVITY;
 //        Intent serviceStartIntent = new Intent(this, TestBackgroundService.class);

+ 14 - 0
app/src/main/java/com/kongzue/dialogxdemo/activity/MainActivity.java

@@ -44,6 +44,7 @@ import com.google.android.material.button.MaterialButtonToggleGroup;
 import com.kongzue.baseframework.BaseActivity;
 import com.kongzue.baseframework.interfaces.DarkNavigationBarTheme;
 import com.kongzue.baseframework.interfaces.DarkStatusBarTheme;
+import com.kongzue.baseframework.interfaces.FullScreen;
 import com.kongzue.baseframework.interfaces.Layout;
 import com.kongzue.baseframework.interfaces.NavigationBarBackgroundColorRes;
 import com.kongzue.baseframework.util.CycleRunner;
@@ -65,6 +66,7 @@ import com.kongzue.dialogx.interfaces.BaseDialog;
 import com.kongzue.dialogx.interfaces.BottomDialogSlideEventLifecycleCallback;
 import com.kongzue.dialogx.interfaces.DialogLifecycleCallback;
 import com.kongzue.dialogx.interfaces.DialogXAnimInterface;
+import com.kongzue.dialogx.interfaces.DialogXRunnable;
 import com.kongzue.dialogx.interfaces.MenuItemTextInfoInterceptor;
 import com.kongzue.dialogx.interfaces.OnBackPressedListener;
 import com.kongzue.dialogx.interfaces.OnBackgroundMaskClickListener;
@@ -506,6 +508,18 @@ public class MainActivity extends BaseActivity {
             @Override
             public void onClick(View view) {
                 MessageDialog.show("标题", "这里是正文内容。", "确定")
+                        .onShow(new DialogXRunnable<MessageDialog>() {
+                            @Override
+                            public void run(MessageDialog dialog) {
+                                tip("onshow");
+                            }
+                        })
+                        .onDismiss(new DialogXRunnable<MessageDialog>() {
+                            @Override
+                            public void run(MessageDialog dialog) {
+                                tip("dismiss");
+                            }
+                        })
                         .setTitleIcon(R.mipmap.img_demo_avatar)
                         .setOkButton(new OnDialogButtonClickListener<MessageDialog>() {
                             @Override

+ 2 - 0
app/src/main/res/values/styles.xml

@@ -5,6 +5,8 @@
         <item name="colorPrimary">@color/colorPrimary</item>
         <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
         <item name="colorAccent">@color/colorAccent</item>
+
+<!--        <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>-->
     </style>
 
     <style name="AppCompatTheme" parent="Theme.MaterialComponents.DayNight">

+ 1 - 1
gradle.properties

@@ -19,7 +19,7 @@ android.useAndroidX=true
 # Automatically convert third-party libraries to use AndroidX
 android.enableJetifier=true
 
-BUILD_VERSION=0.0.50.beta5
+BUILD_VERSION=0.0.50.beta6
 BUILD_VERSION_INT=49
 DIALOGX_STYLE_VERSION=5
 android.nonTransitiveRClass=true