-1

I've recently upgraded from .NET 9 to .NET 10. My MAUI app runs on both Windows and Android and uses AppFlyout rather than the conventional AppShell. When running the app on Android 15 the flyout menu now overwrites the status bar at the top of the screen but on .NET 9 this didn't happen. Is there a method of calculating the status bar height in Android 15 rather than hard-coding a value for an Android-only margin at the top of the menu?

2
  • What do you mean "overwrites the status bar"? Commented Nov 22 at 10:43
  • To understand the issue, a screenshot would be helpful. Commented Nov 22 at 14:07

1 Answer 1

-1

you just have to disable edge-to-edge in MainActivity

using Android.App;
using Android.Content.PM;
using Android.OS;
using AndroidX.Core.View;

namespace clic2market.mobile;

[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);

        // Disable edge-to-edge: let system fit windows (content won't draw under system bars)
        WindowCompat.SetDecorFitsSystemWindows(Window, true);
    }
}
New contributor
Jose Benitez is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.