You can draw it on IB (iOS) and in axml (Android) (and in visual studio for
windows things) and call them the same names, or create all by code but if
on windows I don't use all controls created by code, why I will make it all
in code now, but It's a personal preference. Some things like textboxes has
properties with the same name, some another no.
But you can create extensions like SetText() for controls in all SO so you
can write the almost same code. And/or create custom controls like I made a
Form class on iOS with things like Close(), DialogResult, etc, as needed.
And you can create things like a ComboBox class (if you came from windows as
me) with same methods like Add, Remove, Items and SelectedItem but on iOS it
can open a table or a spinner an on windows it is a real comboBox.
In truth, actually I open UIViews in the same way that I open a Form on
windows with the above Form class I mean, exactly the same code. Didn't do
it yet on Monodroid but it's in plans. A few #if to help and that is. On
windows mobile I have SQL Mobile running and on iOS Sqlite, sharing the same
queries (with a little help of an adapter wrapler in string class that
changes some things like GETDATE() to datetime('localtime', 'now) or
something like that. (well, I'm panning to change db to sqlite on windows
mobile to be things more easy).
Karl
From: Robert Jordan <[email protected]>
Date: Wed, 10 Aug 2011 14:56:24 +0200
To: "[email protected]" <[email protected]>
Subject: Re: [MonoTouch] Performance cost of MonoTouch vs. Objective-C
On 10.08.2011 14:39, kbudris wrote:
> I've only worked with MonoTouch so far... haven't yet needed to work on
> Microsoft or Android devices. Just how portable is a MonoTouch app to
> Android? I can see where I might be able to reuse the data model, but the
> entire presentation layer seems so Apple-specific. Wouldn't the entire UI
> need to be scrapped and rewritten for Android?
The presentation layer needs to be rewritten according to the
device's own user interface guides. That's the philosophy
behind Mono{Touch|Droid}.
The other option would be to develop in Obj-C, Java and C# using
different tools and reusing ~nothing.
Robert
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch