SCREEN UTILIZATION

Giorgio Sfiligoi 571 Reputation points
2025-11-10T20:43:35.78+00:00

I am developing an Android application using NET MAUI 10 with VS 2026.

I notice that professional Android applications have two possible approaches with reference to the bottom bar (that contains the back, home and overview buttons), namely:

  1. This bar is always left visible and the application fills the remaining of the screen;
  2. The application hides the bar, however the user may slide it in to activate the buttons.

How can I tell my program which one of these two options it should use?

Normally my application is using option 1 (which I prefer). However, right now at times it overlaps the bottom bar, and its buttons interfere with those in my app; I exit the app and re-start it, and the 'regular' display as per option 1 appears.

This did not happen with NET 9.

Developer technologies | .NET | .NET MAUI
0 comments No comments
{count} votes

Answer accepted by question author
  1. Michael Le (WICLOUD CORPORATION) 5,065 Reputation points Microsoft External Staff Moderator
    2025-11-11T10:18:35.1933333+00:00

    Hello Giorgio,

    The overlap is due to Android 15's new edge-to-edge enforcement, which MAUI 10 has adopted. Previously, Android automatically reserved space for system bars (navigation and status), but now apps must explicitly handle this spacing through window insets.

    The documentation also describes this behavior in this section: Backward compatible inset dispatching.

    This is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.

    The behavior you're seeing (where restarting fixes it temporarily) likely occurs during activity recreation—when Android restores your app's state, the inset handling may not be applied consistently.

    Disable Edge-to-Edge

    If you prefer the traditional behavior (system bars always visible with reserved space), add this to your MainActivity.cs:

    using Android.OS; 
    
    namespace YourApp.Platforms.Android 
    { 
        [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true)] 
        public class MainActivity : MauiAppCompatActivity 
        { 
            protected override void OnCreate(Bundle savedInstanceState) 
            { 
                base.OnCreate(savedInstanceState); 
                
                // Disable edge-to-edge and use legacy system bar spacing 
                Window?.SetDecorFitsSystemWindows(true); 
            } 
        } 
    } 
    

    I hope this clarifies your issue.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Q&A Assist
    2025-11-10T20:43:51.2833333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    In .NET MAUI, the behavior of the bottom navigation bar (system navigation bar) is generally managed by the Android operating system and is not directly controlled by your application. However, you can ensure that your application layout respects the space taken by the navigation bar by using the appropriate layout settings.

    To avoid overlap with the navigation bar, you can use the Padding or Margin properties in your layout to adjust the content position. This way, your application can fill the remaining screen space without interfering with the navigation buttons.

    If you want to ensure that your application behaves consistently with the navigation bar, consider the following:

    • Use OnWindowInsets: You can listen to window insets to adjust your layout dynamically based on the visibility of the navigation bar.
    • Set WindowCompat.SetDecorFitsSystemWindows: This method can help you manage how your app fits within the system windows, which includes the navigation bar.

    For specific implementation details, you may need to refer to the Android platform-specific documentation or explore layout options that respect system UI elements.

    If you are experiencing issues that were not present in .NET MAUI 9, it may be beneficial to check for any changes in layout behavior or updates in the framework that might affect how your application interacts with the system navigation bar.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.