mail-archives/monodroid/2011-December/007541.html

145 строки
6.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [mono-android] New Mono for Android release does not work with some samples on GitHub
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:monodroid%40lists.ximian.com?Subject=%5Bmono-android%5D%20New%20Mono%20for%20Android%20release%20does%20not%20work%20with%0A%20some%20samples%20on%20GitHub&In-Reply-To=CACWcBbnFA4R0uafY9XYvSq2y2CHRW8frFwZ0cfqQpcSGtNsJ6Q%40mail.gmail.com">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="007495.html">
<LINK REL="Next" HREF="007542.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[mono-android] New Mono for Android release does not work with some samples on GitHub</H1>
<B>Tomasz Cielecki</B>
<A HREF="mailto:monodroid%40lists.ximian.com?Subject=%5Bmono-android%5D%20New%20Mono%20for%20Android%20release%20does%20not%20work%20with%0A%20some%20samples%20on%20GitHub&In-Reply-To=CACWcBbnFA4R0uafY9XYvSq2y2CHRW8frFwZ0cfqQpcSGtNsJ6Q%40mail.gmail.com"
TITLE="[mono-android] New Mono for Android release does not work with some samples on GitHub">tomasz at ostebaronen.dk
</A><BR>
<I>Tue Dec 6 03:43:17 EST 2011</I>
<P><UL>
<LI>Previous message: <A HREF="007495.html">[mono-android] New Mono for Android release does not work with some samples on GitHub
</A></li>
<LI>Next message: <A HREF="007542.html">[mono-android] New Mono for Android release does not work with some samples on GitHub
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#7541">[ date ]</a>
<a href="thread.html#7541">[ thread ]</a>
<a href="subject.html#7541">[ subject ]</a>
<a href="author.html#7541">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>OK. About that OverlayItem. I have a Custom overlay item which looks like this:
class NMTOverlayItem : OverlayItem
{
private float[] color;
public NMTOverlayItem(GeoPoint point, String title, String
snippet, float[] color)
: base(point, title, snippet)
{
this.color = color;
}
public float[] Color
{
get { return color; }
}
}
Now in the itenized overlay I have the CreateItem method:
protected override NMTOverlayItem CreateItem(int index)
{
return overlayItems.ElementAt(index);
}
I get the following error:
'NSPublic.AndroidClient.NMTItemizedOverlay.CreateItem(int)': return
type must be 'Java.Lang.Object' to match overridden member
'Android.GoogleMaps.ItemizedOverlay.CreateItem(int)'
Any ideas as to why this is happening?
On Mon, Dec 5, 2011 at 6:52 PM, Tomasz Cielecki &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">tomasz at ostebaronen.dk</A>&gt; wrote:
&gt;<i> Awesome, will give it a go tomorrow :-)
</I>&gt;<i>
</I>&gt;<i> As always good job on the new release!
</I>&gt;<i>
</I>&gt;<i> On Dec 5, 2011 5:38 PM, &quot;Jonathan Pryor&quot; &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">jonp at xamarin.com</A>&gt; wrote:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> On Dec 5, 2011, at 11:25 AM, Tomasz Cielecki wrote:
</I>&gt;&gt;<i> &gt; Due to changes to how sensors work, i.e. stuff being moved into
</I>&gt;&gt;<i> &gt; SensorTypes the samples on GitHub do not work anymore.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Changes needed to get the samples working with the new release were done
</I>&gt;&gt;<i> on the release-2-0 branch, which was just merged to master ~10 minutes ago.
</I>&gt;&gt;<i> Please update your repo and see if that fixes it. :-)
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> &gt; Also there has been some changes in the ItemizedOverlay now having the
</I>&gt;&gt;<i> &gt; CreateItem method registered, but it needs to return a
</I>&gt;&gt;<i> &gt; Java.Lang.Object, does that mean that my custom OverlayItem has to
</I>&gt;&gt;<i> &gt; inherit from Java.Lang.Object? I thought OverlayItem was already a
</I>&gt;&gt;<i> &gt; Java.Lang.Object?
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> OverlayItem inherits Java.Lang.Object, so your class inheriting from
</I>&gt;&gt;<i> OverlayItem will also inherit Java.Lang.Object, just not directly.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Subclassing OverlayItem is fine (and required, iirc).
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> &gt; Is there a list of changes made in the newest release somewhere?
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> <A HREF="http://android.xamarin.com/Releases/Mono_for_Android_4/Release_4.0.0#API_Changes">http://android.xamarin.com/Releases/Mono_for_Android_4/Release_4.0.0#API_Changes</A>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> &#160;- Jon
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> _______________________________________________
</I>&gt;&gt;<i> Monodroid mailing list
</I>&gt;&gt;<i> <A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">Monodroid at lists.ximian.com</A>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> UNSUBSCRIBE INFORMATION:
</I>&gt;&gt;<i> <A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">http://lists.ximian.com/mailman/listinfo/monodroid</A>
</I>
--
Med Venlig Hilsen / With Best Regards
Tomasz Cielecki
<A HREF="http://ostebaronen.dk">http://ostebaronen.dk</A>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="007495.html">[mono-android] New Mono for Android release does not work with some samples on GitHub
</A></li>
<LI>Next message: <A HREF="007542.html">[mono-android] New Mono for Android release does not work with some samples on GitHub
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#7541">[ date ]</a>
<a href="thread.html#7541">[ thread ]</a>
<a href="subject.html#7541">[ subject ]</a>
<a href="author.html#7541">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/monodroid">More information about the Monodroid
mailing list</a><br>
</body></html>