Minimum content width when pinned nav menu

This commit is contained in:
M66B 2021-08-11 21:25:25 +02:00
parent 37f8d7df32
commit c05f14269d
1 changed files with 4 additions and 4 deletions

View File

@ -801,10 +801,10 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
return Helper.dp2pixels(this, 48);
DisplayMetrics dm = getResources().getDisplayMetrics();
if (layoutId == R.layout.activity_view_landscape_split && nav_pinned)
return Helper.dp2pixels(this, 300);
else if (layoutId != R.layout.activity_view_landscape_split && nav_pinned)
return Math.min(Helper.dp2pixels(this, 300), dm.widthPixels / 2);
if (nav_pinned) {
int maxWidth = dm.widthPixels - Helper.dp2pixels(this, 300);
return Math.min(Helper.dp2pixels(this, 300), maxWidth);
}
else {
int actionBarHeight;
TypedValue tv = new TypedValue();