C# Xamarin : How to change navigation bar color?

Viewed 205

I just simply want to change the bottom navigation bar's color to match my app's theme.

In which file, where and how can I change it?

For example here

1 Answers

In your Android folder, in MainActivity.cs on method OnCreate, after the LoadApplication(new App()); define your color like this:

var mainColor = Android.Graphics.Color.Rgb(29, 53, 87);

then set it:

if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop)
{
   Window.SetNavigationBarColor(mainColor);
}
Related