dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.82k stars 1.66k forks source link

Flyout Page: IconImageSource doesn't work on Android #15211

Open kubaflo opened 1 year ago

kubaflo commented 1 year ago

Description

Description: When the IconImageSource property is set on the Flyout page in the mobile application, there is an inconsistency between the Android and iOS platforms. While iOS correctly displays the specified icon, Android shows a default hamburger icon instead.

Expected Results: The specified custom icon should be displayed consistently on both Android and iOS platforms.

Actual Results: On Android, a default hamburger icon is displayed instead of the custom icon specified by the IconImageSource property. iOS correctly displays the specified custom icon.

Additional Information: The issue persists across different versions of Android. The custom icon image is in the correct format and meets the required specifications. No error or warning messages are displayed in the application logs. Other properties and functionalities of the Flyout page work as expected on both Android and iOS platforms.

Screenshot 2023-05-24 at 13 40 17

Steps to Reproduce

  1. Create a mobile application with a Flyout page.
  2. Set the IconImageSource property to a custom icon image.
  3. Deploy the application on both an Android device and an iOS device.

Link to public reproduction project repository

https://github.com/kubaflo/FlyoutPage-Inconsistent-icons based on https://learn.microsoft.com/en-us/samples/dotnet/maui-samples/navigation-flyoutpage/

Version with bug

7.0.86

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

Android 13, iOS 16.2

Did you find any workaround?

No response

Relevant log output

No response

daltzctr commented 1 year ago

I have encountered this issue on WinUI3 also. I've yet to find a workaround and for WinUI3, it makes flyoutpage completely broken

ghost commented 1 year ago

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

knocte commented 1 year ago

@rachelkang sorry, but I don't think this is Shell related? btw, I believe @kubaflo has re-framed the bug after you added those labels, it is an Android-only problem bug.

webwarrior-ws commented 1 year ago

On Windows also default icon is used when FlyoutLayoutBehavior="Popover" regardless of value of IconImageSource property.

Flyout_iconimagesource_windows

MingK12 commented 11 months ago

Does anyone have news about this? im still having this problem

MingK12 commented 9 months ago

i found a workaround basicly we need to do is remove the navigation bar and create a grid and add the icon that we want and the icon just add a gesture where IsPresented = !IsPresented; , if you are doing in a difrent page just add an action to the page and then give the item that is going to do that that action ;

XamlTest commented 7 months ago

Verified this on Visual Studio Enterprise 17.9.0 Preview 1(8.0.3). Repro on Android 14.0-API34 with below Project: FlyoutPageSample.zip

FlavioGoncalves-Cayas commented 4 weeks ago

Here is a workaround for Android that worked for me. However, it does not use the IconImageSource property and instead accesses the resource directly.

https://gist.github.com/FlavioGoncalves-Cayas/3f14dea04fe5e2489220be77738e561e