Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The FlyoutPage toolbar icon does not work in Android and iOS #24480

Closed
bzd3y opened this issue Aug 27, 2024 · 4 comments
Closed

The FlyoutPage toolbar icon does not work in Android and iOS #24480

bzd3y opened this issue Aug 27, 2024 · 4 comments
Labels
area-controls-flyout Flyout migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 platform/iOS 🍎 t/bug Something isn't working

Comments

@bzd3y
Copy link

bzd3y commented Aug 27, 2024

Description

In an app upgraded from Xamarin.Forms that uses a FlyoutPage, the toolbar icon does not work on both platforms, with each behaving differently.

On Android, setting FlyoutPage.IconImageSource appears to do nothing. The icon seems to always be the default "hamburger" icon.

On iOS the app throws an exception saying that it is unable to find the image. This issue may have to do with using an SVG image, since the app previously used a PNG image for the icon and no exception was thrown.

Currently I am unable to provide a reproduction project because some Visual Studio/macOS updates have broken iOS development for new projects. I have been able to get it to work with my real project, but it doesn't work with the project I created to try to reproduce this.

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.80 SR8

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@bzd3y bzd3y added the t/bug Something isn't working label Aug 27, 2024
Copy link
Contributor

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!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@bzd3y
Copy link
Author

bzd3y commented Aug 28, 2024

I have reverted to using a PNG for the menu icon and that does work in iOS. But none of the other SVGs show up in iOS, but no exception is thrown.

That lead me to discover that it looks like it is an issue with the file extension. So it looks like SVG doesn't work because Maui rasterizes SVGs to a PNG and on iOS the extensions cause problems.

That does seem like a bug, but maybe one that is more easily worked around.

@PureWeen PureWeen added the migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert label Aug 29, 2024
@PureWeen
Copy link
Member

Duplicate of #13368

@PureWeen PureWeen marked this as a duplicate of #13368 Aug 29, 2024
@bzd3y
Copy link
Author

bzd3y commented Aug 30, 2024

@PureWeen I think this might have been marked as a duplicate for the wrong issue. That issue about analyzers doesn't really seem like the same issue.

After further testing, it looks like SVGs in iOS just don't work. For example, I set Color="#ff0000" on my toolbar icons in the project file and they get a white background. The hamburger menu icon does not look right and appears to be translated to the right some or not resized correctly. All this works on Android.

Are SVGs just not supported on iOS right now and I need to switch back to PNGs?

@github-actions github-actions bot locked and limited conversation to collaborators Oct 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-flyout Flyout migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 platform/iOS 🍎 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants