mirror of https://github.com/M66B/FairEmail.git
Ensure the height of the toolbar is set
This commit is contained in:
parent
96686111b8
commit
19adb34026
|
@ -117,6 +117,10 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
|
|||
Toolbar toolbar = holder.findViewById(R.id.toolbar);
|
||||
View placeholder = holder.findViewById(R.id.placeholder);
|
||||
|
||||
ViewGroup.LayoutParams lp = toolbar.getLayoutParams();
|
||||
lp.height = Helper.getActionBarHeight(this);
|
||||
toolbar.setLayoutParams(lp);
|
||||
|
||||
toolbar.setPopupTheme(getThemeId());
|
||||
if (hide_toolbar) {
|
||||
AppBarLayout.LayoutParams params = (AppBarLayout.LayoutParams) toolbar.getLayoutParams();
|
||||
|
|
|
@ -920,7 +920,8 @@ public class Helper {
|
|||
if (context.getTheme().resolveAttribute(android.R.attr.actionBarSize, tv, true)) {
|
||||
DisplayMetrics dm = context.getResources().getDisplayMetrics();
|
||||
actionBarHeight = TypedValue.complexToDimensionPixelSize(tv.data, dm);
|
||||
} else
|
||||
}
|
||||
if (actionBarHeight == null || actionBarHeight <= 0)
|
||||
actionBarHeight = Helper.dp2pixels(context, 56);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue