Mono for Android–Beyond getting started

24Feb13

A few weeks ago I bit the bullet and bought Mono for Android. I also decided to update to all devices to Ice Cream Sandwich as the UI is just so much better. Should have done that ages ago, but I was just afraid Kies would brick my phone again.

Anyway, the new features that I m sure anyone interested in android development already know about: Services, fragments, new UI. Cool stuff, it also meant a lot to learn Open-mouthed smile.

Some things that you might want to try out if you are starting this out:

  1. Preferably have a device or two Winking smile, the emulator is slow. The x86 emulator is an interesting option, it didn’t work for me initially but then I tried a few different virtual devices and then you could really see the benefits… way faster. Still is good to deploy to the phone often enough.
  2. Since android 3.0 there is a new way to do drag drop that works as a state machine. More info in the excellent Jeremie Laval’s blog. Check the other posts, they are really cool too.
  3. Fragments are trickier to deal with that I thought. Pretty sure I’m doing something wrong (as all times you start learning something new) but I wanted to replace a fragment (with UI elements on it) with another fragment (also with UI elements on it) however if the first fragment was placed there with the layout xml and the second one programmatically, It just didn’t work. It did work when both where placed programmatically. Any hints on this would be great.
  4. To use the Holo Theme across your app, simply add this snipet to your manifest to your manifest. More on styles here.

android manifest segment

One to check out… there is an android unit test suite Andr.unit (github repo)a unit testing framework for android based on Touch.Unit.

Advertisements


One Response to “Mono for Android–Beyond getting started”

  1. 1 Sam

    Some info about replacing layout fragments: http://portabledroid.wordpress.com/2011/04/19/programmatic-and-layout-fragments/
    TLDR: Don’t. Create them problematically if you need to replace them.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: