iOS | WP7 | Android | |
---|---|---|---|
"View" | XIB (Interface Builder) | Xaml | axml |
UIViewController | PhoneApplicationPage (codebehind) | Activity | |
n/a (UIAutoResizing) | StackPanel | LinearLayout | |
UITableView | ListBox | ListView | |
UITableViewCell | ListBox.ItemTemplate | n/a (any view) | |
UITableViewSource | n/a (binding, IEnumerable) | BaseAdapter | |
Navigation "Controller" | NavigationController. PushViewController() | NavigationService. Navigate() | StartActivity() |
n/a (object) | Xaml Uri | Intent.SetClass() | |
n/a (object properties) | Xaml Uri querystring params | Intent.PutExtra() .AddFlags() | |
n/a (object properties) | NavigationContext .QueryString .TryGetValue() | Intent .GetXXXExtra() | |
Threading | InvokeOnMainThread | Dispatcher.BeginInvoke | RunOnUiThread |
"Model" | C# .NET objects - shared thanks to Mono on iOS & Android. Also WebClient , Linq , Generics , Xml , Serialization , etc... :-) |
One major difference between iOS and the other two (both in terms of coding and also UI design) is the presence of hardware buttons and the back-stack.
Hardware buttons
The most important hardware button is Back (covered next) however Android's Menu button is also significant for the impact is has on UI design compared to iOS and WP7. Both Apple and Microsoft's designers like the application menu (
UITabBarController
, ApplicationBar
) to be permanently visible. Google, on the other hand, provides the Menu button to show the menu, meaning that most of the time it is hidden. This means your Android app UI might need to provide other visual clues so that navigation/features/options are more discoverable.Back stack
Both Android and WindowsPhone7 devices have a hardware Back button supported by the respective SDKs via the 'back-stack' which is analogous to your web-browser History: each "View" has an "address" (a Xaml
Uri
in WP7, an Intent
in Android) which is stored as the user navigates through your application. At any time (unless you intercept it) the hardware Back button allows the user to cycle back through previous views until they have exited your app.iOS utilises a similar navigation metaphor in its
UINavigationController
- however the back button is 'soft' (displayed in the top-left corner of the screen) and the scope is limited to the set of views that the developer chose to include in that navigation context.