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

Color binding changes #1225

Merged
merged 3 commits into from
Jan 24, 2018
Merged

Color binding changes #1225

merged 3 commits into from
Jan 24, 2018

Conversation

atsushieno
Copy link
Contributor

let's see how generator is messing around by simply enabling color metadata fixup. Things are not as simple and stupid as you dream without working on it...

…abling color metadata fixup. Things are not as simple and stupid as you dream without working on it...
@atsushieno atsushieno added the do-not-merge PR should not be merged. label Jan 24, 2018
…WallpaperColor.

It turned out that the criminal who generated _Color and ColorObject as
internal was *metadata fixup*, not generator itself. It was buried in
thousands of lines of `src/Mono.Android/metadata`.

Color is absolutely a technical debt that Xamarin.Android should clean up
and provide every related API in int properties and constants, but so far
add a workaround by renamed Color->ColorObject class.
@atsushieno
Copy link
Contributor Author

For internal reference: original Color design was added back in 2012 at monodroid/e47da17f

@atsushieno atsushieno removed the do-not-merge PR should not be merged. label Jan 24, 2018
@atsushieno atsushieno requested a review from jonpryor January 24, 2018 08:45
@atsushieno
Copy link
Contributor Author

regarding #1201 here is the results from mono --debug /sources/xamarin-android/bin/BuildDebug/mono-api-html.exe reference/Mono.Android.xml temp/Mono.Android.xml --ignore-changes-parameter-names at external/xamarin-android-api-compatibility:

Type Changed: Android.App.WallpaperManager

Added methods:

	public virtual void AddOnColorsChangedListener (WallpaperManager.IOnColorsChangedListener, Android.OS.Handler);
	public virtual WallpaperColors GetWallpaperColors (int);
	public virtual void RemoveOnColorsChangedListener (WallpaperManager.IOnColorsChangedListener);

@@ -1390,16 +1387,10 @@

We will have to enable this line and bring back some sanity.
-->
<!-- attr path="/api/package[@name='android.graphics']/class[@name='Color']" name="managedName">AndroidColor</attr -->
<attr path="/api/package[@name='android.graphics']/class[@name='Color']" name="managedName">ColorObject</attr>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ColorObject and not AndroidColor?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am 100% sure that people try to look up "Color" something. AndroidColor will never give that impression to developers.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants