Я установил флаги, но всякий раз, когда я тестирую его на своем локальном устройстве, он отказывается работать в полноэкранном режиме. Вот скриншот:

Вот мой MainActivity.cs для платформы Android:
Код: Выделить всё
using Android.App;
using Android.Content.PM;
using Android.OS;
using Android.Views;
using AndroidX.Core.View;
namespace FTPBuddy
{
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity
{
protected override void OnCreate(Bundle? savedInstanceState)
{
base.OnCreate(savedInstanceState);
Window?.AddFlags(WindowManagerFlags.Fullscreen | WindowManagerFlags.LayoutInScreen);
Window?.ClearFlags(WindowManagerFlags.ForceNotFullscreen);
var controller = Window?.InsetsController;
controller?.Hide(WindowInsets.Type.SystemBars());
}
}
}
Подробнее здесь: https://stackoverflow.com/questions/787 ... llscreened
Мобильная версия