Use fixed action bar height

pull/215/head
M66B 1 year ago
parent 0c770ff07b
commit 44d96d1ca9

@ -919,20 +919,8 @@ public class Helper {
// View // View
static Integer actionBarHeight = null;
static int getActionBarHeight(Context context) { static int getActionBarHeight(Context context) {
if (actionBarHeight == null) { return Helper.dp2pixels(context, 56);
TypedValue tv = new TypedValue();
if (context.getTheme().resolveAttribute(android.R.attr.actionBarSize, tv, true)) {
DisplayMetrics dm = context.getResources().getDisplayMetrics();
actionBarHeight = TypedValue.complexToDimensionPixelSize(tv.data, dm);
}
if (actionBarHeight == null || actionBarHeight <= 0)
actionBarHeight = Helper.dp2pixels(context, 56);
}
return actionBarHeight;
} }
static int getBottomNavigationHeight(Context context) { static int getBottomNavigationHeight(Context context) {

Loading…
Cancel
Save