Open Brosten opened 2 months ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
@Brosten I tried to verify the issue but it didn't reproduce. Can you share a sample project with us so I can investigate further? Looking forward to your reply!
@jaosnz-rep: Sure, her's a repo. RotationCrash.zip
I run this on an android tablet emulator, running Android 14 (API 34) After rapidly rotating the screen in random directions, it crashes after 5-10 rotations.
I can repro this issue at Android platform on the latest 17.12.0 Preview 2.0 (8.0.90 & 8.0.82& 8.0.80).
Is there any known workaround for this? It is affecting many of our users. I tried forcing the orientation to landscape on Android Tablet (RequestedOrientation = ScreenOrientation.Landscape;) however some users still experience the crash (on devices Galaxy Tab Active2, Galaxy Tab Active3, Galaxy Z Fold6)
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: https://github.com/dotnet/maui/issues/20858 https://github.com/dotnet/maui/issues/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