maui icon indicating copy to clipboard operation
maui copied to clipboard

FlyoutPage inside a NavigationPage causes different behavior between Android and iOS

Open DouglasGiovanella opened this issue 2 years ago • 2 comments
trafficstars

Description

We are migrating our app from Xamarin forms (5.0.0.2612) to Maui in the last weeks and we encountered a deal breaker when testing the android version. We use a single navigationPage for all the app lifeCycle, so when the user first opens the app, the root page is a LoginPage, if authentication succeed, he is directed to a logged area, that is a FlyoutPage with all the app features. After migrating the project to Maui (.net 7 - 7.0.96), we tested on iOS and this behavior worked just fine (beside some events that the navigationPage is trigging in a different order), but on Android the Hamburger menu did not appear. After testing the flyoutSample we discover that the problem was because the FlyoutPage is not the application MainPage.

The expected behaviour would be two toolbars appearing, on Xamarin Forms (Android and iOS) and Maui iOS we use the NavigationPage.HasNavigationBar="False" to hide one of then, but this don't seems to work either on Maui Android.

Here same examples: Maui iOS image

Maui iOS with NavigationPage.HasNavigationBar="False" in the FlyoutPage: image

Maui Android in both cases: image

My guess that this is a problem caused by the new Navigation on Android, since on iOS its stiils uses the old one from XF.

Steps to Reproduce

No response

Link to public reproduction project repository

https://github.com/DouglasGiovanella/MauiFlyoutSample

Version with bug

7.0.96

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

Just changing the application MainPage to use directly the FlyoutPage, for us is a big structural change, but maybe can help someone else.

Relevant log output

No response

DouglasGiovanella avatar Oct 21 '23 17:10 DouglasGiovanella

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

ghost avatar Oct 23 '23 14:10 ghost

Verified this on Visual Studio Enterprise 17.8.0 Preview 4.0(8.0.0-rc.2.9373). Repro on Android 14.0-API34, not repro on iOS 16.4 with below Project: FlyoutTest.zip

XamlTest avatar Oct 24 '23 06:10 XamlTest