Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Android safe area #6363

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions osu.Framework.Android/AndroidGameActivity.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. 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;
Expand Down Expand Up @@ -55,11 +53,6 @@ protected override void OnCreate(Bundle? savedInstanceState)
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()
Expand Down
4 changes: 2 additions & 2 deletions osu.Framework.Android/AndroidGameSurface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ public override void HandleResume()
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>
Expand Down
Loading