-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
area-navigationNavigationPageNavigationPagemigration-compatibilityXamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-ConvertXamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convertpartner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/androids/triagedIssue has been reviewedIssue has been reviewedt/bugSomething isn't workingSomething isn't working
Milestone
Description
Description
The condition to show the flyout button (burger) or not is set in method ShouldShowToolbarButton of the FlyoutPage.
In Android, this method is not hit when orientation changes. This method is only called once during initialization.
Test is done with a physical Android tablet running MAUI 8.0.90-dev.
Under iOS, rotation of an iPad triggers correctly method ShouldShowToolbarButton.
The default code of ShouldShowToolbarButton of depends on the orientation. It’s inconsistent not to trigger this code after rotation.
public virtual bool ShouldShowToolbarButton()
{
if (DeviceInfo.Idiom == DeviceIdiom.Phone)
return true;
FlyoutLayoutBehavior behavior = FlyoutLayoutBehavior;
var orientation = DeviceDisplay.MainDisplayInfo.Orientation;
bool isSplitOnLandscape = (behavior == FlyoutLayoutBehavior.SplitOnLandscape || behavior == FlyoutLayoutBehavior.Default) && orientation.IsLandscape();
bool isSplitOnPortrait = behavior == FlyoutLayoutBehavior.SplitOnPortrait && orientation.IsPortrait();
return behavior != FlyoutLayoutBehavior.Split && !isSplitOnLandscape && !isSplitOnPortrait;
}
Steps to Reproduce
- Create an MAUI app for MAUI 8.0
- For simplification purposes, set TargetFrameworks to net8.0-android only
- Set a FlyoutPage as the MainPage
- Set a simple ContentPage as Flyout of the MainPage
- Set a NavigationPage as Detail of the MainPage
Link to public reproduction project repository
No response
Version with bug
8.0.80 SR8
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
Android 12.0
Did you find any workaround?
Modification of source code in Maui-main\src\Controls\src\Core\NavigationPage\NavigationPageToolbar.cs
Relevant log output
No response
Metadata
Metadata
Assignees
Labels
area-navigationNavigationPageNavigationPagemigration-compatibilityXamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-ConvertXamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convertpartner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/androids/triagedIssue has been reviewedIssue has been reviewedt/bugSomething isn't workingSomething isn't working