Many thanks Jon

I found that if I just put the namespace in front of the EditTextEx in the
axml it works
i.e. "<agar14.EditTextEx"></agar14.EditTextEx">
doesn't seem to like the fully qualified com.murray.Agar14 (yes I made the
mistake of the namespace starting with a lowercase 'a' whereas the package
has a "A"  :-(

much appreciated

John


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Jonathan Pryor
Sent: 14 October 2011 16:14
To: [email protected]; Discussions related to Mono for Android
Subject: Re: [mono-android] an old basic question How to stop the softinput
appearing on an Edit text

On Oct 14, 2011, at 10:55 AM, John Murray wrote:
> Sorry to admit I don't know how to get at the logcat 

        http://docs.xamarin.com/android/advanced_topics/android_debug_log

> depdate = FindViewById<EditTextEx>(Resource.Id.depdate);
> 
> does one have to specify the subclass in the xml?

Yes. The type that you specify in the FindViewById<T>() call must be the
class or a base class of the type specified in the XML. If your XML uses
<EditText/>, then you need to use FindViewById<EditText>() or some base
class of EditText (e.g. View).

Thus, if you want to use an EditTextEx, you must use EditTextEx in the
.axml:

        
http://docs.xamarin.com/android/getting_started/hello_glcube?highlight=eleme
nt#Activity_Startup

It's somewhat obtuse (we need better docs here), but to use a custom type in
your .axml you need to use the fully qualified _Java_ ACW name of  your
type, which is (usually) the lower-cased namespace and your normal type
name:

        <your.namespace.here.EditTextEx />

If you're not sure what the package name is, after a build look within the
obj\Debug\android\src directory for the EditTextEx.java file, and use the
value of the `package` statement.

 - Jon

_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to