Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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 for Bug 57521 on
Developer Community or GitHub if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
In Java, there is an implicit conversion between int and android.graphics.Color in both directions.
On Xamarin.Android there is only an implicit conversion from Color to Int32 but not the other way around.
(In reply to Daniel Katz from comment #0)
> In Java, there is an implicit conversion between int and
> android.graphics.Color in both directions.
> On Xamarin.Android there is only an implicit conversion from Color to Int32
> but not the other way around.
Can you give a couple of concrete examples of the implicit conversions in Java and what is lacking in comparison in the Xamarin.Android bindings? This will help give a clear picture of what exactly we can add to help.
I assume you are referring to a color int which is packed in a 32 bit int. i.e. ARGB (8 bit/8 bit/8 bit/8 bit)
Perhaps in this scenario is might be better to implement a "ColorInt" attribute similar to the @ColorInt annotation in Android.
One thing to keep in mind is that Color longs are coming in Android O, so we might want to do a similar thing there.
I am going to CONFIRM this as there is some general improvements here in the sense of adding some extension methods for
Color -> int / int -> Color
long -> Color / Color -> long