-
Notifications
You must be signed in to change notification settings - Fork 25
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
Exception in AppBarButton when it is inside a NavigationBar in Android #623
Comments
Am pretty sure it has indeed to be a BitmapImage as it is a limitation of the underlying plarform(s). cc @kazo0 ? |
Yes there's currently a limitation that only allows BitmapIcon to work as the Icon for AppBarButtons within the NavigationBar for iOS and Android. Docs here The crash without any helpful error message should be fixed with the following PR but the images will still only work as BitmapIcons at this point You can use some conditional XAML to set the icon to different types depending on the platform for now The SVG not working on WASM is curious though, I will take a look at the sample app |
@Suriman Looking into this now, I am able to see the FontIcons on WASM, is there another issue on WASM that you are experiencing? Also, I have updated the package versions used in the sample app to the latest dev bits and the NavigationBar will now render, although the AppBarButtons that are not using a Attached is the up-to-date repro app |
Should be fixed by #622 |
Re-Open and waiting for #631 |
Current behavior
The AppBarButton works correctly in WinUI but:
- Does not support SVG images in Wasm and Android.
- When it is included in a NavigationBar it raises exception if the content is different of a BitmapImage in Android platform.
Expected behavior
The AppBarButton supports all functionality on all platforms.
How to reproduce it (as minimally and precisely as possible)
Open the attached project and compile it.
Execute the Android project and the NavigationBar fails to load because the AppBarButton image load throws an exception, if all the AppBarButton are commented except the one containing the BitmapImage it loads correctly.
Code that reproduces the error in this file:
UnoAppBarButtonAndroid.zip
Workaround
No workaround.
Works on UWP/WinUI
Yes
Environment
Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
NuGet package version(s)
Uno.WinUI 4.9.20
Affected platforms
WebAssembly, Android
IDE
Visual Studio 2022
IDE version
17.6.3
Relevant plugins
No response
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: