Bug 53909 - XML drawables cannot be used as ToolbarItem.Icon
Summary: XML drawables cannot be used as ToolbarItem.Icon
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android (show other bugs)
Version: 2.3.4
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-03-24 13:24 UTC by Alexander
Modified: 2017-03-29 18:24 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: Yes
Last known good build: 2.3.3.193

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Alexander 2017-03-24 13:24:58 UTC
In earlier versions an android XML drawables can be used as toolbar icons.
For example: https://bugzilla.xamarin.com/show_bug.cgi?id=25661#c12
Please note - there is no other way to show different icons for enabled/disabled toolbar items.

In 2.3.4, after merging https://github.com/xamarin/Xamarin.Forms/pull/437, this functionality was broken - now only PNG files can be used. Attempt to use XML drawables causes errors in android log like this:

E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /ic_delete_white: open failed: ENOENT (No such file or directory)

And corresponded toolbar item contains text only.

Please, restore possibility to use XML drawables in XF.Android.
Comment 1 Samantha Houts [MSFT] 2017-03-29 16:58:39 UTC
Should be fixed in 2.3.4-pre6. Thank you!