diff --git a/app/src/main/java/eu/faircode/email/Helper.java b/app/src/main/java/eu/faircode/email/Helper.java index 5249096dc6..07186ccc39 100644 --- a/app/src/main/java/eu/faircode/email/Helper.java +++ b/app/src/main/java/eu/faircode/email/Helper.java @@ -619,11 +619,18 @@ public class Helper { if (context.getTheme().resolveAttribute(android.R.attr.actionBarSize, tv, true)) { DisplayMetrics dm = context.getResources().getDisplayMetrics(); return TypedValue.complexToDimensionPixelSize(tv.data, dm); - } - else + } else return Helper.dp2pixels(context, 56); } + static int getBottomNavigationHeight(Context context) { + int resid = context.getResources().getIdentifier("design_bottom_navigation_height", "dimen", context.getPackageName()); + if (resid <= 0) + return Helper.dp2pixels(context, 56); + else + return context.getResources().getDimensionPixelSize(resid); + } + static Intent getChooser(Context context, Intent intent) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) { PackageManager pm = context.getPackageManager();