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

Back Arrow Color on Lollipop with FormsAppCompatActivity

$
0
0

What is the proper way to change the back arrow color when using FormsAppCompatActivity?

I created a new project and followed the instructions here to use Material Design:

https://blog.xamarin.com/material-design-for-your-xamarin-forms-android-apps/

On KitKat, I see white text and a white arrow with a NavigationPage, however on Lollipop I get white text and a dark arrow that's #0f456f (black with 54% opacity over #2196f3).

Here's the basic code I used to test this:

public class App : Application
{
    public App ()
    {
        var page1 = new ContentPage () {
            Title = "Page 1"
        };

        page1.Navigation.PushAsync (new ContentPage () {
            Title = "Page 2",
            Content = new SearchBar () {
                Text = "This should remain dark."
            }
        });

        MainPage = new NavigationPage (page1) {
            BarTextColor = Color.White
        };

    }
}

(Full project attached)

I tried using colorControlNormal in the style, but that also changed other controls (e.g. SearchBar). I'd like to only change the color of the back arrow.

Thanks!


Viewing all articles
Browse latest Browse all 89864

Trending Articles