Wider navigation menu on extra large screens

master
M66B 2 months ago
parent 6f66b299cf
commit bedc399ecc

@ -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);
}
}
}

Loading…
Cancel
Save