Description
After browsing to a page by a command on the FlyoutPage, the back button ain't working anymore.
This only happens on Android 16 (API 36) and does NOT occur on Android 14 (API 34) so it might have something to do with: predictive-back-gesture https://developer.android.com/guide/navigation/custom-back/predictive-back-gesture#update-custom
| OK by using Button on DetailPage |
NOT OK by using Button on FlyOutPage |
 |
 |
Steps to Reproduce
OK Scenario:
- Open the sample app from https://github.com/3sRykaert/MauiMemoryleak/tree/BackButtonNotWorking
- Click the button to go to the "DetailPage1" on "StartPage"
- Press the Android Back Button
- A PopUp appears to show you have pressed the BackButton (which is ok)
- Click the button to go to the "StartPage" on "DetailPage1"
- Click the button to go to the "DetailPage1" on "StartPage" (same as step 2)
- Press the Android Back Button (same as step 3)
- A PopUp appears to show you have pressed the BackButton (which is ok)
NOT OK Scenario
- Open the sample app from https://github.com/3sRykaert/MauiMemoryleak/tree/BackButtonNotWorking
- Click the button to go to the "DetailPage1" on "StartPage"
- Press the Android Back Button
- A PopUp appears to show you have pressed the BackButton (which is ok)
- Open the "FlyOut Page" and there press the button to go the "StartPage"
- Click the button to go to the "DetailPage1" on "StartPage" (same as step 2)
- Press the Android Back Button (same as step 3)
- NO PopUp appears to show you have pressed the BackButton (which is not ok) (also breakpoint in
protected override bool OnBackButtonPressed() on MasterPage.xaml.cs does not hit)
Link to public reproduction project repository
https://github.com/3sRykaert/MauiMemoryleak/tree/BackButtonNotWorking (so repo: https://github.com/3sRykaert/MauiMemoryleak/ but branch BackButtonNotWorking)
Version with bug
10.0.20
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
Only tested on Android (14 is not impacted, 16 is)
Did you find any workaround?
No
Relevant log output
Description
After browsing to a page by a command on the FlyoutPage, the back button ain't working anymore.
This only happens on Android 16 (API 36) and does NOT occur on Android 14 (API 34) so it might have something to do with:
predictive-back-gesturehttps://developer.android.com/guide/navigation/custom-back/predictive-back-gesture#update-customSteps to Reproduce
OK Scenario:
NOT OK Scenario
protected override bool OnBackButtonPressed()on MasterPage.xaml.cs does not hit)Link to public reproduction project repository
https://github.com/3sRykaert/MauiMemoryleak/tree/BackButtonNotWorking (so repo: https://github.com/3sRykaert/MauiMemoryleak/ but branch BackButtonNotWorking)
Version with bug
10.0.20
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
Only tested on Android (14 is not impacted, 16 is)
Did you find any workaround?
No
Relevant log output