Android crashing when rotating a flyout page #24779
Labels
area-controls-flyoutpage
FlyoutPage
migration-compatibility
Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert
platform/android 🤖
s/triaged
Issue has been reviewed
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Milestone
Description
I'm opening a new issue on this topic, since the existing once are incorrectly closed.
I use a flyout page and when rotating the screen, ~1 time out of 10 the app crashes.
The error message is something like:
androidx.drawerlayout.widget.DrawerLayout.getDrawerViewAbsoluteGravity
java.lang.ClassCastException: androidx.appcompat.widget.LinearLayoutCompat$LayoutParams cannot be cast to androidx.drawerlayout.widget.DrawerLayout$LayoutParams
Other similar, closed reports:
#20858
#18161
Steps to Reproduce
Link to public reproduction project repository
No response
Version with bug
8.0.82 SR8.2
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
All versions, what I know of
Did you find any workaround?
From what I found, setting
FlyoutLayoutBehavior = FlyoutLayoutBehavior.Popover;
seems to prevent the crashes. But you also loose the visible flyout that can be nice to have, at least on landscape tablets.
Relevant log output
The text was updated successfully, but these errors were encountered: