diff --git a/app/src/main/java/eu/faircode/email/ActivityView.java b/app/src/main/java/eu/faircode/email/ActivityView.java index 0fc2d6fe76..d18fb068f6 100644 --- a/app/src/main/java/eu/faircode/email/ActivityView.java +++ b/app/src/main/java/eu/faircode/email/ActivityView.java @@ -1400,8 +1400,17 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB // Screen width 320 - action bar 56 = 264 dp // Icons 6 x (24 width + 2x6 padding) = 216 dp int drawerWidth = screenWidth - actionBarHeight; - int dp320 = Helper.dp2pixels(this, 320); - return Math.min(drawerWidth, dp320); + + // https://github.com/flutter/flutter/issues/123380 + // https://m3.material.io/components/navigation-drawer/specs + Configuration config = getResources().getConfiguration(); + if (config.isLayoutSizeAtLeast(Configuration.SCREENLAYOUT_SIZE_XLARGE)) { + int dp360 = Helper.dp2pixels(this, 360); + return Math.min(drawerWidth, dp360); + } else { + int dp320 = Helper.dp2pixels(this, 320); + return Math.min(drawerWidth, dp320); + } } }