Bug 53178 - NavigationPage BarTextColor does not change color of arrow
Summary: NavigationPage BarTextColor does not change color of arrow
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.3.3
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Jimmy [MSFT]
Depends on:
Reported: 2017-03-09 07:18 UTC by Josha Munnik
Modified: 2017-06-16 17:37 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

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 Josha Munnik 2017-03-09 07:18:02 UTC
Not sure if this count as a bug.

As stated changing the BarTextColor does not change the arrow color.

Fix would be simple. Add following to UpdateToolbar method in Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer (line 823):

    if (!textColor.IsDefault) {
       DrawerArrowDrawable icon = bar.NavigationIcon as DrawerArrowDrawable;
       if (icon != null) {
          icon.Color = textColor.ToAndroid();
Comment 1 Jimmy [MSFT] 2017-03-11 00:22:01 UTC
Thank you for your feedback! On native Android apps, the back button color seems to also be an opt-in customization and is not tied to the Toolbar's text color. You should be able to accomplish this on Forms using an effect[1].

Since this would be a behavioral change in Forms, this would be classified as an enhancement request and would be best suited as a proposal in our Evolution forum[2] for future consideration or a contribution to the Forms Community Toolkit[3]. When submitting a proposal on the Evolution forum, be sure to first read the submission guidelines[4] so your proposal is ready for discussion with the Forms team and community.

[1] https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/effects/introduction/
[2] https://forums.xamarin.com/categories/xamarin-forms-evolution
[3] https://github.com/FormsCommunityToolkit/FormsCommunityToolkit
[4] https://forums.xamarin.com/discussion/84503/please-read-first
Comment 2 Josha Munnik 2017-03-11 05:49:12 UTC
It is a actually a bug.

The iOS implementation of NavigationPage renderer does actually change BOTH the arrow and back title.

    // set Tint color (i. e. Back Button arrow and Text)
    NavigationBar.TintColor = 
        barTextColor == Color.Default || 
        statusBarColorMode == StatusBarTextColorMode.DoNotAdjust
        ? UINavigationBar.Appearance.TintColor
	: barTextColor.ToUIColor(); 

I assume the Android implementation should do the same?

I don't think you can use effect for this; since you can not access the Toolbar or its NavigationIcon property of a NavigationPage.
Comment 3 Cody Beyer (MSFT) 2017-06-16 17:37:52 UTC

The iOS implementation will mimic what doing so on iOS native would do. The overarching goal of forms is to provide one UI language that then translate to perfectly native experiences on the target platform. 

This would still fall under the enhancement request, so the instructions from comment 1 should be followed.