[mono-android] axml files issues

john Murray john at murray.uk.com
Mon Mar 21 11:36:32 EDT 2011


As per previous posts I've been wrestling with the best way to do a dialog
data entry form 

I have a form which has 14 fields this is on a scrolling screen - call it
layout2

 

When I switch to activity 2  which  uses layout2 the debugger hangs on the
first FindViewbyID it comes across in the Oncreate() 

protected override void OnCreate(Bundle bundle)

        {

            base.OnCreate(bundle);

            SetContentView(Resource.Layout.layout2);

//here!!!            Button button =
FindViewById<Button>(Resource.Id.cancelpedit);

            button.Click += delegate { bclick2(); };

        }

 

I have experimented with an alternative layout which does not have so many
other fields and only contains the cancelpedit button 

This works fine and fast - so I presume I have a problem with the
layout2.axml

 

Actually I have commented out the FindViewByID and the layout2.axml loads
albeit with a slightly scrambled view so I resume now it's something to do
with FindViewById

 

Does anyone know - are there restrictions on how much you can pack into a
axml file? Is there some tool which will allow me to check the validity of
the axml?

I am aware of and use the very buggy DroidDraw and I have tried testing the
axml in Eclipse (works in DroidDraw but not in eclipse - Eclipse appears to
have a different dialect e.g. match_parent instead of fill_parent ) So now I
am totally confused 

 

 

 

 

John Murray

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/mailman/private/monodroid/attachments/20110321/741d907a/attachment.html 


More information about the Monodroid mailing list