Forum Xamarin.Forms

Change status bar color dynamically in Xamarin Forms app

I am using Android styles.xml to set the Status bar color (ColorPrimaryDark) but I want the status bar color to be one color (grey) in my main menu, and another color (navy) everywhere else. How do I achieve this for both Android and iOS?

Answers

  • Ahsanzz1Ahsanzz1 Member ✭✭

    This will change it for android.
    Add following code in your mainactivity on android
    Window.SetStatusBarColor(Android.Graphics.Color.Black);
    Replace Black with your desired color.

Sign In or Register to comment.