2
votes

Recently my Xamarin forms Android app has started hiding the top action bar on the main screen. After navigating to a child page it comes back. But this is very bad since the main page's navigation bar also has the menu button which can now never be tapped.

How do I prevent the behaviour that makes this title/action bar slide away and disappear?

1
Provide some more information, graphics and if possible code also. - Pravin Divraniya
Can you tell us which navigation do you use ? docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/… - Jimbot

1 Answers

1
votes

The problem was that I was calling NavigationPage.SetHasNavigationBar(this, false); to get rid of the double nested navigation bar on iPhone. I've fixed it by doing this:

if (Device.RuntimePlatform == Device.Android)
{
    NavigationPage.SetHasBackButton(this, false);
}
else if (Device.RuntimePlatform == Device.iOS)
{
    NavigationPage.SetHasNavigationBar(this, false);
}