mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-13 11:20:31 +00:00
Fix Android safe area
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user