[Xamarin.Forms][Android] Change back and next color in navigation

I’ have some navigation page and I want to override the color for the back button and my next button ( ToolbarItem )

I Already tried BarTextColor property but it change color for all navigation header text.

It’s done in IOS, but I’ not able to find a solution for android.

It works perfectly for the title but not for the Icons.

Here my code :

protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            base.OnElementPropertyChanged(sender, e);

            var page = this.Element as NavigationPage;
            if (page != null && toolbar != null)
            {
                toolbar.SetTitleTextColor(Color.Black.ToAndroid());


                if (toolbar.NavigationIcon != null)
                    toolbar.NavigationIcon.SetColorFilter(Color.Green.ToAndroid(), Android.Graphics.PorterDuff.Mode.Multiply);
                if (toolbar.OverflowIcon != null)
                    toolbar.OverflowIcon.SetColorFilter(Color.Green.ToAndroid(), Android.Graphics.PorterDuff.Mode.Multiply);

            }

        }

Powered by Zordis

Share This Post
Have your say!
00

Leave a Reply