0
votes

I got the sample app from https://github.com/PrismLibrary/Prism/tree/master/Sandbox/Xamarin/HelloWorld

I tested it on Android 6:

  1. Run the app from sample code (no modifications), it shows MainPage
  2. Tap on ViewA from the menu, it navigates to ViewA, but there is no back button in the app bar.

Hitting device back button works, it navigates back to MainPage.

The behavior I am expecting is to see the back button in the bar too.

UPDATE

I'm debugging Prism, and I can see clearly that Prism's PageNavigationService navigates to ViewA by just calling currentPage.Navigation.PushAsync(page, animated). I can see that the Xamarin Forms's NavigationImpl has the NavigationStack with two pages, MainPage and ViewA. So the MainPage is still there in the navigation stack, but for some reason the back button is not visible.

ANSWER! @lowleetak discovered that there is a call somewhere in the sample which hides the back button!

1

1 Answers

1
votes

The app start in MasterDetail page. Where the MasterPage is the Menu and DetailPage is the MyNavigationPage/MainPage initially.

When you click ViewA from menu, it is changing the DetailPage from MainPage to MyNavigationPage/ViewA. It is the root/initial page in the navigation stack of the DetailPage. So, there is no Back button showing.