question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android] Fullscreen not filling space when hiding Navigation.

See original GitHub issue

Description

When I hide both the Navigation Bar and Title Bar the spacer where the bottom navigation bar remains filled with unusable space. This started happening after my last VS update.

Steps to Reproduce

  1. Create a New MAUI app
  2. Under Platforms -> Android -> MainActivity.cs add:
protected override void OnCreate(Bundle savedInstanceState)
    {
        base.OnCreate(savedInstanceState);
        var uiOptions =
            SystemUiFlags.HideNavigation |
            SystemUiFlags.LayoutHideNavigation |
            SystemUiFlags.LayoutFullscreen |
            SystemUiFlags.Fullscreen |
            SystemUiFlags.LayoutStable |
            SystemUiFlags.ImmersiveSticky;

        if (Window == null) return;
        Window.DecorView.SystemUiVisibility = (StatusBarVisibility)uiOptions;
        this.Window?.AddFlags(WindowManagerFlags.Fullscreen);
    }
  1. Under MainPage.xaml->MainPage.xaml.cs add:
 protected override void OnAppearing()
    {
        base.OnAppearing();

        NavigationPage.SetHasNavigationBar(this, false);
        Shell.SetNavBarIsVisible(this, false);
    }

You will notice the titlebar and the navigation bar are completely gone, but the space where the navigation bar was is now purple.

Android 9 image

Android 12 image image

You cannot force this space to be filled.

Link to public reproduction project repository

https://github.com/TannerDBlack/MAUI-Fullscreen-Issue-Example

Version with bug

6.0.312

Last version that worked well

6.0.312

Affected platforms

Android

Affected platform versions

Android 9, API 28; Android 12 API 32

Did you find any workaround?

No

Relevant log output

None

Issue Analytics

  • State:open
  • Created 7 months ago
  • Reactions:2
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
TannerDBlackcommented, Apr 18, 2023

@japarson @PureWeen This is not fixed. So the actual difference in the behaviors listed above, .NET7 is now a white bar that is still unusable space.

Fresh app with hidenav set and background set to Orange to show the issue: image

Here is my app after moving to NET7, For record the bottom is supposed to be a gray bar like the top with buttons. image

0reactions
aureo91commented, Jul 28, 2023

I noticed the same issues on net7. Change background color allow to see the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - Full Screen without navigation & status bars
If there are still spaces for the system bar and navigation bar even under immersive mode. Make sure the splash imageView is not...
Read more >
Hide system bars for immersive mode
Hide system bars for immersive mode ... Some content is best experienced in fullscreen without any indicators on the status bar or the...
Read more >
How to hide the navigation bar? : r/GooglePixel
Hiding the nav bar is one of like, 3 reasons I have to root my p6 lol ... refuses to hide in apps...
Read more >
Display content edge-to-edge in your app
Display content edge-to-edge in your app · Step 1: Lay out your app in full screen · Step 2: Change the color of...
Read more >
Android: Full Screen UI with Transparent Status Bar
This article talks about how to make the status bar transparent in any Android app. Also, it deals with how to make a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found