I'm trying to make the status bar completely transparent like in this picture
but i could only make it like this
i'm getting that transparent black bar even though i'm changing the opacity of the statusbar.
I'm trying to make the status bar completely transparent like in this picture
but i could only make it like this
i'm getting that transparent black bar even though i'm changing the opacity of the statusbar.
Add this in your OnCreate Method in Xamarin.Android project before calling this method LoadApplication(new App()) :
private void TransparentStatusBar()
{
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);
}
}
```
Add this in your OnCreate in Xamarin.Android project:
Window.SetFlags(WindowManagerFlags.LayoutNoLimits, WindowManagerFlags.LayoutNoLimits);
And add this into your styles.xml in Xamarin.Android project:
<item name="android:fitsSystemWindows">true</item>
I would suggest, you should go directly to android project in your solution.
Here's what I found: Android transparent status bar and actionbar
This is easy to achieve, go to your android project, access your styles and add this to your custom style :
<item name="android:windowTranslucentStatus">true</item>