Hello,
======Update======================
You can do this by adding following code in the Oncreate method of MainActivity.cs
.
public class MainActivity : MauiAppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
this.Window.SetFlags(WindowManagerFlags.LayoutNoLimits,WindowManagerFlags.LayoutNoLimits);
this.Window.ClearFlags(WindowManagerFlags.TranslucentStatus);
this.Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds);
this.Window.DecorView.SystemUiVisibility = 0;
this.Window?.SetStatusBarColor(this.Resources.GetColor(Resource.Color.translucent));
}
}
Then open the Platform/Android/Resources/Values/colors.xml
, add this item <color name="translucent">#00000000</color>
Best Regards, Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 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.