Bug 32822 - Use of modals resets Android's navigation bar color to black
Summary: Use of modals resets Android's navigation bar color to black
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 1.4.4
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-08-06 08:09 UTC by Christoffer Mikkelsen
Modified: 2017-08-30 15:34 UTC (History)
7 users (show)

Tags: ac, navigationbar, navigation
Is this bug a regression?: ---
Last known good build:

Screenshot of the navigationbar after color has changed (from green) (46.36 KB, image/png)
2015-08-06 08:09 UTC, Christoffer Mikkelsen
Reproduction project (183.55 KB, application/zip)
2015-08-13 17:14 UTC, Paul DiPietro [MSFT]

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Christoffer Mikkelsen 2015-08-06 08:09:35 UTC
Created attachment 12379 [details]
Screenshot of the navigationbar after color has changed (from green)

When you pop a modal, the navigation bar changes it's color to black.

The operation is handled with the following code:

backButton.Clicked += async (object sender, EventArgs e) => {
   await App.Navigation.PopModalAsync();

We set our navigation bar color the following way:

NavigationPage navPage = new NavigationPage (searchView) {
   BarBackgroundColor = Color.Green,
   BarTextColor = Color.White,

We then save it as the a static property in App.Navigation;

This only happens on Android devices (both tablets and phones)
Comment 1 Paul DiPietro [MSFT] 2015-08-13 17:14:27 UTC
Created attachment 12495 [details]
Reproduction project
Comment 2 Paul DiPietro [MSFT] 2015-08-13 17:15:04 UTC
Confirming that while using this is occurring in Android, but not on iOS. Attached a reproduction project.
Comment 3 Jon Goldberger [MSFT] 2015-08-27 21:54:37 UTC
This seems to be related to bug #31511
Comment 4 Jeffrey 2016-03-24 13:35:15 UTC
Anybody any info on when this bug will be fixed?
Comment 5 Falko Schindler 2016-07-11 17:36:27 UTC
I found a rather lean workaround. Put this into your MainActivity:

    Xamarin.Forms.Application.Current.ModalPopping += (sender, e) => ActionBar.SetBackgroundDrawable(new ColorDrawable(Color.Red.ToAndroid()));

(And replace Red with the color of your choice.)
Comment 6 adrianknight89 2016-11-14 04:53:52 UTC
It looks like this issue does not exist on AppCompat.
Comment 7 David Ortinau [MSFT] 2017-08-30 15:34:39 UTC
Confirmed this is fixed in