不说任何废话,上代码,不好用来打我
Platforms/Android/MainActivity.cs
protected override void OnCreate(Bundle savedInstanceState)
{
Google.Android.Material.Internal.EdgeToEdgeUtils.ApplyEdgeToEdge(Window, true);
if (OperatingSystem.IsAndroidVersionAtLeast((int)BuildVersionCodes.Q))
{
Window.StatusBarContrastEnforced = false;
Window.NavigationBarContrastEnforced = false;
}
base.OnCreate(savedInstanceState);
}
MAUI Android想做透明状态栏和导航栏,但找的代码很多都有兼容性问题,所幸看到了这篇 https://blog.csdn.net/Mr_Tony/article/details/121612215 代码不多,但嘎嘎好用
标签:false,状态栏,savedInstanceState,Window,MAUI,Android From: https://www.cnblogs.com/Yu-Core/p/18149097