Issue
I am using the code below for hiding status bar:
if (Build.VERSION.SdkInt >= BuildVersionCodes.Kitkat)
{
// for covering the full screen in android..
Window.SetFlags(WindowManagerFlags.LayoutNoLimits,
WindowManagerFlags.LayoutNoLimits);
// clear FLAG_TRANSLUCENT_STATUS flag:
Window.ClearFlags(WindowManagerFlags.TranslucentStatus);
Window.SetStatusBarColor(Android.Graphics.Color.Transparent);
}
The problem is that it also hides my bottom navigation menu
Is there any way for solving that?
Solution
That's because you used WindowManagerFlags.LayoutNoLimits
,resulting in the back key, menu key button bar and page content overlap.
You could change like:
if (Build.VERSION.SdkInt >= BuildVersionCodes.Kitkat)
{
Window.SetStatusBarColor(Android.Graphics.Color.Transparent);
var uiVisibility = SystemUiFlags.LayoutFullscreen | SystemUiFlags.LayoutStable;
FindViewById(Android.Resource.Id.Content).SystemUiVisibility = (StatusBarVisibility)uiVisibility ;
}
Answered By - Leo Zhu - MSFT
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.