From 449ec7cecd813b5b4de5835c8c8c14b2f6fd0987 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Wed, 16 Aug 2023 17:32:26 -0600 Subject: [PATCH] ui: fix gap in landscape bottom sheet dialog Apparently a second-order effect of the prior fix since the insetTop value would now shift the dialog downwards unneccessarily. --- .../material/bottomsheet/BackportBottomSheetBehavior.java | 5 ++++- .../material/bottomsheet/BackportBottomSheetDialog.java | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/google/android/material/bottomsheet/BackportBottomSheetBehavior.java b/app/src/main/java/com/google/android/material/bottomsheet/BackportBottomSheetBehavior.java index f9e8edb42..577036ec4 100644 --- a/app/src/main/java/com/google/android/material/bottomsheet/BackportBottomSheetBehavior.java +++ b/app/src/main/java/com/google/android/material/bottomsheet/BackportBottomSheetBehavior.java @@ -1752,7 +1752,10 @@ public class BackportBottomSheetBehavior extends CoordinatorLayo Insets mandatoryGestureInsets = insets.getInsets(WindowInsetsCompat.Type.mandatorySystemGestures()); - insetTop = systemBarInsets.top; + // MODIFICATION: Fix second order change of edge-to-edge fix where dialogs will not + // use the nice-looking inset animation and instead blindly shift themselves downwards. + // insetTop = systemBarInsets.top; + // MODIFICATION: Fix awful assumption that clients handling edge-to-edge by themselves // don't need peek height adjustments (Despite the fact that they still likely padding // the view, just without clipping anything) diff --git a/app/src/main/java/com/google/android/material/bottomsheet/BackportBottomSheetDialog.java b/app/src/main/java/com/google/android/material/bottomsheet/BackportBottomSheetDialog.java index af5cc64bf..060fe04d2 100644 --- a/app/src/main/java/com/google/android/material/bottomsheet/BackportBottomSheetDialog.java +++ b/app/src/main/java/com/google/android/material/bottomsheet/BackportBottomSheetDialog.java @@ -53,8 +53,6 @@ import com.google.android.material.internal.EdgeToEdgeUtils; import com.google.android.material.motion.MaterialBackOrchestrator; import com.google.android.material.shape.MaterialShapeDrawable; -import org.checkerframework.common.subtyping.qual.Bottom; - /** * Base class for {@link android.app.Dialog}s styled as a bottom sheet. *