Fix Android safe area

This commit is contained in:
hwsmm
2024-08-20 01:26:58 +09:00
parent 2c34fc2c88
commit 3075810de8
2 changed files with 2 additions and 9 deletions

View File

@@ -1,12 +1,10 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using Android.App;
using Android.Content;
using Android.Content.PM;
using Android.OS;
using Android.Views;
using ManagedBass;
using Org.Libsdl.App;
using osu.Framework.Extensions.ObjectExtensions;
@@ -55,11 +53,6 @@ namespace osu.Framework.Android
System.Environment.CurrentDirectory = System.Environment.GetFolderPath(System.Environment.SpecialFolder.UserProfile);
base.OnCreate(savedInstanceState);
if (OperatingSystem.IsAndroidVersionAtLeast(28))
{
Window.AsNonNull().Attributes.AsNonNull().LayoutInDisplayCutoutMode = LayoutInDisplayCutoutMode.ShortEdges;
}
}
protected override void OnStop()

View File

@@ -58,10 +58,10 @@ namespace osu.Framework.Android
isSurfaceReady = true;
}
public override WindowInsets? OnApplyWindowInsets(WindowInsets? insets)
public override WindowInsets? OnApplyWindowInsets(View? view, WindowInsets? insets)
{
updateSafeArea(insets);
return base.OnApplyWindowInsets(insets);
return base.OnApplyWindowInsets(view, insets);
}
/// <summary>