Quantcast
Channel: User Liyun Zhang - MSFT - Stack Overflow
Viewing all articles
Browse latest Browse all 446

Answer by Liyun Zhang - MSFT for MAUI: Hide and show bottom options (Back/Home/Recent) and view page in full screen

$
0
0

You don't have to use the WeakReferenceMessenger. You can use the conditional compilation instead of it.

#if  ANDROIDusing Android.Views;#endif  ...  protected override void OnAppearing()    {        base.OnAppearing();#if  ANDROID        Platform.CurrentActivity.Window.DecorView.SystemUiVisibility = (StatusBarVisibility)                (SystemUiFlags.ImmersiveSticky | SystemUiFlags.HideNavigation |                 SystemUiFlags.Fullscreen | SystemUiFlags.Immersive);#endif    }    protected override void OnDisappearing()    {        base.OnDisappearing();#if  ANDROID        Platform.CurrentActivity.Window.DecorView.SystemUiVisibility = (StatusBarVisibility)        (SystemUiFlags.Visible |         SystemUiFlags.Visible | SystemUiFlags.Immersive);#endif    }

In additio, the systemuivisibility was deprecated, you can use Platform.CurrentActivity.Window.InsetsController.Hide( WindowInsets.Type.SystemBars()); to hide the system bars and use the Platform.CurrentActivity.Window.InsetsController.Show( WindowInsets.Type.SystemBars() ); to show them.


Viewing all articles
Browse latest Browse all 446

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>