Hello,
Welcome to our Microsoft Q&A platform!
You can use SystemUiFlags
like following code
var uiOptions =
SystemUiFlags.HideNavigation |
SystemUiFlags.LayoutHideNavigation |
SystemUiFlags.LayoutFullscreen |
SystemUiFlags.Fullscreen |
SystemUiFlags.LayoutStable |
SystemUiFlags.ImmersiveSticky;
Window.DecorView.SystemUiVisibility = (StatusBarVisibility)uiOptions;
I notice that systemUiVisibility
is deprecated in Android R. You can use IWindowInsetsController
.
IWindowInsetsController insetsController = Window.InsetsController;
if (insetsController != null)
{
insetsController.Hide(WindowInsets.Type.NavigationBars());
}
In addition, you can hide NavigationBar by Xamarin.Forms
NavigationPage.SetHasNavigationBar(this, false);
For more information you can refer to :
https://learn.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/navigation/
https://learn.microsoft.com/en-us/dotnet/api/android.views.view.systemuiflaghidenavigation?view=xamarin-android-sdk-9
https://stackoverflow.com/questions/62577645/android-view-view-systemuivisibility-deprecated-what-is-the-replacement
Best Regards,
Wenyan Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.