隐藏导航栏和状态栏后,我的应用程序如何完全占据整个window?

How can my app fully occupy the entire window after hiding the Navigation Bar & the Status Bar?

我需要我的应用在隐藏导航栏和状态栏后完全占据整个 window。

下面是我隐藏状态栏和导航栏的代码。

this.Window.DecorView.SystemUiVisibility = Android.Views.StatusBarVisibility.Hidden;
this.Window.SetFlags(WindowManagerFlags.Fullscreen, WindowManagerFlags.Fullscreen);
this.Window.DecorView.SetFitsSystemWindows(true);

虽然导航按钮没有了,但应用程序仍然没有占据整个空间window。我很确定我错过了一个步骤,或者我可能错误地使用了 SetFitsSystemWindows 方法。

如果有人能提供帮助或至少指出我可以解决这个问题的方向,我们将不胜感激。

干杯!

我认为您试图实现沉浸式全屏模式,在此 link 您可以阅读有关此功能的更多信息。