Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Android navbar color reverts when stacked 3 deep on Galaxy Note

$
0
0

Our app uses the NavigationPage constructor initialization to set the navbar color like this:
new NavigationPage(new ContentPage())
{
BarBackgroundColor = Color.FromHex("#ffffff")
};

This works perfectly on iOS, and we thought it had been working on Android for a long time, but we noticed now that it has a few problems. It works perfectly on a Galaxy S4 SGH-I337 running 5.0.1 but it has problems on a Galaxy Note SGH-I717 running Android 4.1.2. As soon as we reach 3 screens deep in the navigation stack by Navigation.PushAsync, the navbar reverts to the color from the Android Theme. The stranger thing is that when you go back from the topmost screen once the navbar has reverted color, it persists into the previous page, like this:

(We want white, the theme describes gray)
1st page (white) -> 2nd page (white) -> 3rd page (gray) -> 2nd page (gray) -> 1st page (white)

Unfortunately, it looks like a very simple app with the same navigation scheme as our app does NOT experience our issue, so I’m not able to get a solid recreation scenario. Additionally, breakpoints as the new screens get stacked show navbar thinks it is the right color, but it is appearing as the wrong color all the same. Does anybody know if there any known bugs that would cover such behavior?

I think I can probably find a way to fix this by not using the BarBackgroundColor altogether using a Custom Renderer or by altering the theme itself, but I would really prefer to keep the implementation in the Forms project so that the color I’m using is recorded in a single place for both iOS and Android.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>