I have Xamarin Forms Solution and in Xamarin Android project I would like to set back button title. However when I set it, it is not shown. On Help page I am setting back button title:
[assembly: ExportRenderer(typeof(HelpPage), typeof(HelpPageRenderer_Droid))]
namespace XX.Droid.Renderers
{
public class HelpPageRenderer_Droid : PageRenderer
{
protected override void OnDraw(Canvas canvas)
{
base.OnDraw(canvas);
var page = Element as HelpPage;
NavigationPage.SetHasBackButton(page, true);
NavigationPage.SetBackButtonTitle(page, "Help");
}
}
}
Then I push new About Page on navigation stack:
private async void OpenAboutPage()
{
await Navigation.PushAsync(new AboutPage());
}
As a result, on About page back button is shown, but there is no back button title. What am I doing wrong? Does someone has back button title in their Android app?
Edit: I tried changing order of pages - to put HelpPage on top of AboutPage and title is not shown. Edit: I also tried changing colors (BarBackgroundColor and BarTextColor) in case title is present but not visible. I also tried from AboutPage.xaml.cs and HelpPage.xaml.cs to call:
NavigationPage.SetHasBackButton(this, true);
NavigationPage.SetBackButtonTitle(this, "Back");