Hi Paul,

The above things are just loud self thoughtŠ

I'm not doing a real thing yet on Monodroid just on MonoTouch that I think
it's possible but on my old android tests:

OnCreate is like Form1_Load on Windows, so the event than run after the
initialization and constructor of the form class.
As the form class is Results, you can create a constructor there, I don't
remember why (maybe Monodroid template) but my project has:

public FormMain()

{

}

public FormMain (IntPtr handle) : base(handle)

{

}


I would say that in theory you can create a new on like

public FormMain(YourClass yourClass)

{

this.yourClass = yourClass;

}


And on OnCreate you can use the value of this.yourClass.

But looking for how I called the new activityŠ I found this awful thing:

Intent formMain = new Intent(Program.context, typeof(FormMain));

StartActivity(formMain);



So different that Windows and MonoTouch, my new formMain isn't an instance
of the new form/activity/viewŠ it's another thingŠ and IntentŠ Now I bacame
lost heheŠ because on iOS I have Forms, TextBoxes and ComboBoxesŠ using the
native ones overrided. And I'm getting close to do this in Android too but
now I think I must start over with my UI tests, sorryŠ. I became lost now.
Maybe the is a way to call a new intent using a real activity instantiated
(so possible of pass a parameter).



But, you can make this parameter class static on "main" class of the
application and use it everywhere (like User.ID, User.Password, etc).


Karl



_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

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

Reply via email to