[Mono-list] Mono for Android: how to use a non-standard widget from axml?

Dimitar Dobrev dpldobrev at yahoo.com
Mon Mar 11 15:23:14 UTC 2013


    

    I've managed to fix it. Thanks for your help.

    Dimitar



________________________________
 From: Jonathan Pryor <jonpryor at vt.edu>
To: Dimitar Dobrev <dpldobrev at yahoo.com> 
Cc: "mono-list at lists.ximian.com" <mono-list at lists.ximian.com> 
Sent: Monday, March 11, 2013 3:53 PM
Subject: Re: [Mono-list] Mono for Android: how to use a non-standard widget from axml?
 
On Mar 11, 2013, at 8:07 AM, Dimitar Dobrev <dpldobrev at yahoo.com> wrote:
>        I have a class in my project that is a widget. I know I can use it in code as a workaround but can I use it in axml as well? If so, how do I configure it?

The monodroid list [0] or the forums [1] would be a better place to ask.

To refer to a type in a .axml file, you must use either the fully-qualified C# type name (case-sensitive), or the fully-qualified Android Callable Wrapper type name [2, 3]:

    https://github.com/xamarin/monodroid-samples/blob/master/GLCube/Resources/layout/main.xml#L21
    https://github.com/xamarin/monodroid-samples/blob/master/GLCube/PaintingView.cs#L16

The above sample is old, so it's using the Android Callable Wrapper type name, but it could instead use the fully-qualified C# type name instead:

    <Mono.Samples.GLCube.PaintingView
            android:id="@+id/paintingview"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
    />

- Jon

[0]: http://lists.ximian.com/mailman/listinfo/monodroid
[1]: http://forums.xamarin.com/categories/android
[2]: http://forums.xamarin.com/discussion/comment/6912/#Comment_6912
[3]: http://docs.xamarin.com/guides/android/advanced_topics/java_integration_overview/android_callable_wrappers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20130311/87df5513/attachment-0001.html>


More information about the Mono-list mailing list