-1

i managed to change the navigation bar color, but i can't manage to change the part where is the battery or the notifications, i cant find something to do it

i remark with a square the part that I'm talking

enter image description here

This is my code so far

{
public partial class App : Application
{
    public App()
    {
        InitializeComponent();

        MainPage = new NavigationPage(new start())
        {
            BarBackgroundColor = Color.FromHex("#ff5300"),
            BarTextColor = Color.White,
        };
        
        
    }

    protected override void OnStart()
    {
    }

    protected override void OnSleep()
    {
    }

    protected override void OnResume()
    {
    }
}

}

what can i do? thanks in advance and sorry for my English, I'm not a native speaker

2 Answers2

0

I found the solution, i want to change the status bar, and i had to do it in the Android file. in "Style.xml"

There you can change the value of "colorPrmaryDark" and that's it

0

Its called status bar color. If you targetting android and want to set a fixed color, you can add this

On your MainActivity.cs on the Droid project, right after

LoadApplication(new App());

of the overriden OnCreate method, add:

Window.SetStatusBarColor(Android.Graphics.Color.Argb(255, 0, 0, 0));

If you want to change the status bar color dynamically on each page then you can follow the wonderfull answer here. Change status bar color dynamically

Anand
  • 1,866
  • 3
  • 26
  • 49