Bläddra i källkod

0.0.46.beta13 ready
- 修复 CustomDialog#hideWithExitAnim 时对话框未能正确完全隐藏的 bug;
- 修复 BottomMenu#setAllowInterceptTouch(false) 且菜单过长时可能导致部分菜单在屏幕外无法点击到的问题;

kongzue 2 år sedan
förälder
incheckning
afb561ddef
1 ändrade filer med 13 tillägg och 4 borttagningar
  1. 13 4
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/BottomDialog.java

+ 13 - 4
DialogX/src/main/java/com/kongzue/dialogx/dialogs/BottomDialog.java

@@ -643,10 +643,19 @@ public class BottomDialog extends BaseDialog {
                         long enterAnimDurationTemp = 300;
                         
                         float customDialogTop = 0;
-                        if (bottomDialogMaxHeight > 0 && bottomDialogMaxHeight <= 1) {
-                            customDialogTop = boxBkg.getHeight() - bottomDialogMaxHeight * boxBkg.getHeight();
-                        } else if (bottomDialogMaxHeight > 1) {
-                            customDialogTop = boxBkg.getHeight() - bottomDialogMaxHeight;
+                        if (dialog.isAllowInterceptTouch()) {
+                            if (bottomDialogMaxHeight > 0 && bottomDialogMaxHeight <= 1) {
+                                customDialogTop = boxBkg.getHeight() - bottomDialogMaxHeight * boxBkg.getHeight();
+                            } else if (bottomDialogMaxHeight > 1) {
+                                customDialogTop = boxBkg.getHeight() - bottomDialogMaxHeight;
+                            }
+                        } else {
+                            if (bottomDialogMaxHeight > 0 && bottomDialogMaxHeight <= 1) {
+                                customDialogTop = boxBkg.getHeight() - bottomDialogMaxHeight * boxBkg.getHeight();
+                            } else if (bottomDialogMaxHeight > 1) {
+                                customDialogTop = boxBkg.getHeight() - bottomDialogMaxHeight;
+                            }
+                            boxBkg.setPadding(0,0,0, (int) customDialogTop);
                         }
                         
                         //上移动画