Files
osu-framework/osu.Framework.Android/AndroidExtensions.cs
Susko3 857bb38af2 Use window area instead of screen area for safe area computations
This is more correct, as window insets are reported relative to the window/view area.

Uses https://developer.android.com/reference/androidx/window/layout/WindowMetricsCalculator for compat on older platforms.
2024-02-05 17:45:51 +01:00

14 lines
437 B
C#

// 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 Android.Graphics;
using osu.Framework.Graphics.Primitives;
namespace osu.Framework.Android
{
public static class AndroidExtensions
{
public static RectangleI ToRectangleI(this Rect rect) => new RectangleI(rect.Left, rect.Top, rect.Width(), rect.Height());
}
}