Skip to content

FlyoutPage IsGestureEnabled not working on Android #21240

@Kink77

Description

@Kink77

Description

In the Maui FlyoutPageSample, you can try adding IsGestureEnabled="False"

And swiping to show the flyout page still works.

Steps to Reproduce

Load the FlyoutPageSample in the maui samples.
In AppFlyout.xaml, you can add IsGestureEnabled="False"

Start the app. Try to swipe to open the FlyoutPage and it still works.

Link to public reproduction project repository

https://github.com/dotnet/maui-samples/tree/main/8.0/Navigation/FlyoutPageSample

Version with bug

Unknown/Other

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

All Android versions

Did you find any workaround?

I created a handler for FlyoutPage that maps IsGestureEnabled to

        ((DrawerLayout)PlatformView).SetDrawerLockMode(VirtualView.IsGestureEnabled ? DrawerLayout.LockModeUnlocked : DrawerLayout.LockModeLockedClosed);

Relevant log output

It's hard to test the default handlers but from my investigation, it seems to be because of this that it fails : 

In FlyoutViewHandler.Android.cs, in the method void UpdateFlyoutBehavior(),
the following line : 
			if (_detailViewFragment?.DetailView?.Handler?.PlatformView == null)
				return;

resolves to true and it returns so it skips setting the drawer lock mode.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions