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

93 строки
3.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [mono-android] including a subclassed EditText
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:monodroid%40lists.ximian.com?Subject=%5Bmono-android%5D%20including%20a%20subclassed%20EditText&In-Reply-To=00c701ccbf13%2430ee01d0%2492ca0570%24%40gb.com">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="007980.html">
<LINK REL="Next" HREF="007992.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[mono-android] including a subclassed EditText</H1>
<B>Jonathan Pryor</B>
<A HREF="mailto:monodroid%40lists.ximian.com?Subject=%5Bmono-android%5D%20including%20a%20subclassed%20EditText&In-Reply-To=00c701ccbf13%2430ee01d0%2492ca0570%24%40gb.com"
TITLE="[mono-android] including a subclassed EditText">jonp at xamarin.com
</A><BR>
<I>Tue Dec 20 11:24:34 EST 2011</I>
<P><UL>
<LI>Previous message: <A HREF="007980.html">[mono-android] including a subclassed EditText
</A></li>
<LI>Next message: <A HREF="007992.html">[mono-android] installing mono runtime in ics emulator
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#7985">[ date ]</a>
<a href="thread.html#7985">[ thread ]</a>
<a href="subject.html#7985">[ subject ]</a>
<a href="author.html#7985">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>On Dec 20, 2011, at 7:30 AM, John Murray wrote:
&gt;<i> I have subclassed edit text to add a bit of proprietary behaviour called &#8220;EditTextEx&#8221;
</I>&gt;<i> I am having trouble figuring how to use it
</I>&gt;<i> In the XML I get an error (though it compiles ok) which says my subclass is &#8216;Invalid child element &#8216;
</I>&gt;<i>
</I>&gt;<i> I realise I have to include the subclass with a reference to where the class is declared thus
</I>&gt;<i> &lt;com.murray.MonoAndroidSQLite1.EditTextEx
</I>
You need to use the fully-qualified name of the _Java_ Android Callable Wrapper (ACW), which is (probably) com.murray.monoandroidsqlite1.EditTextEx. (Namespaces are lowercased.)
If EditTextEx is a nested type, then it'll be MonoAndroidSqlite1_EditTextEx.
Take a look at the obj\Debug\android\src directory to view the generated ACWs.
- Jon
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="007980.html">[mono-android] including a subclassed EditText
</A></li>
<LI>Next message: <A HREF="007992.html">[mono-android] installing mono runtime in ics emulator
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#7985">[ date ]</a>
<a href="thread.html#7985">[ thread ]</a>
<a href="subject.html#7985">[ subject ]</a>
<a href="author.html#7985">[ 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>