Open andreiionita opened 4 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.
Verified this issue with Visual Studio 17.11.0 Preview 2.0 (8.0.40 & 8.0.21 & 8.0.14). Can repro on Android platform with sample project. Snackbar-main.zip
@PureWeen testing this and it only happens when the page with this Compat Layout
@andreiionita have you tried a port of this snackbar layout to the .NET MAUI custom layout implementation? https://learn.microsoft.com/en-us/dotnet/maui/user-interface/layouts/custom?view=net-maui-8.0 Usually even if the Compat package works, you'll want to still upgrade to the .NET MAUI implementation.
@davidortinau Thank you. Changing the snackbar layout to the .NET MAUI custom layout implementation worked for us.
Description
After navigation away from a page, by changing tabs, that has a container like :
public class SnackbarContainer : Layout<View>
and going back to it, the android app will crash This is not an issue on iOS.Steps to Reproduce
Link to public reproduction project repository
https://github.com/andreiionita/Snackbar
Version with bug
8.0.21 SR4.1
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
I tested it with Android API 34
Did you find any workaround?
Wrap the page content with a grid, it will avoid the crash but it will cause other issues( for me it was a handler mapping action that was not called anymore)
Relevant log output