App.MainPage incorrect behaviour for view appearing and disappearing?

YakoYako USMember ✭✭

The attached application showcase the problem that I am facing. I consider the behaviour as incorrect for Android, for iOS is behaving as expected.
The issue I am facing is switching MainPage property with navigation pages in the stacks, for android it is calling OnAppearing from the bottom up for every page that is in the stack as it is assigned I assign that NavigatePage to App.MainPage property. And then backing out of the pages, it no longer calls OnAppearing as it is considered "appeared" even though it is hidden behind.

From the sample: You can see the described behaviour by performing the following.
1. Start the app
2. Click GOTO PAGE 2 button
06-07 14:03:21.187 I/mono-stdout( 1994): NavigationPlay.PageTwo Appearing...
06-07 14:03:21.499 I/mono-stdout( 1994): NavigationPlay.MainPage Disappearing...
3. Click GOTO PAGE 3 button
06-07 14:03:28.599 I/mono-stdout( 1994): NavigationPlay.PageThree Appearing...
06-07 14:03:28.912 I/mono-stdout( 1994): NavigationPlay.PageTwo Disappearing...
4. Click SWITCH TO ALTERNATE WORLD button
06-07 14:03:37.646 I/mono-stdout( 1994): NavigationPlay.PageThree Disappearing...
06-07 14:03:37.653 I/mono-stdout( 1994): NavigationPlay.AlternateWorldPage Appearing...
Up to this point, all the log out put should show the lines for appearing and disappearing correctly.
5. Click Revert Button. We should be back to Page Three. This is were I have the problem.
The logs shows:
06-07 14:03:58.825 I/mono-stdout( 1994): NavigationPlay.AlternateWorldPage Disappearing...
06-07 14:03:58.832 I/mono-stdout( 1994): NavigationPlay.MainPage Appearing...
06-07 14:03:58.833 I/mono-stdout( 1994): NavigationPlay.PageTwo Appearing...
06-07 14:03:58.834 I/mono-stdout( 1994): NavigationPlay.PageThree Appearing...
6. Click back. Page two is not activated. As it is already a``ctivated.
06-07 14:05:24.504 I/mono-stdout( 1994): NavigationPlay.PageThree Disappearing...
7. Click back. Main Page is not activated. As it is already activated.
06-07 14:05:25.705 I/mono-stdout( 1994): NavigationPlay.PageTwo Disappearing...
8. Click back. Application leaves.

Sign In or Register to comment.