While we developers are currently very lucky with the iPhone platform and its single resolution of 320x480 pixels, the same can't be said for Android. It is the Android platform in particular that, due to the way it's distributed among many manufacturers, has a number of differing screen ratios and resolutions. It is inevitable that there will be times where you may need to calculate the position of an object depending on the size of the current screen, without constantly resorting to a series of Titanium.Platform.osname
checks.
Note
Since the introduction of the iPhone 4, all new iOS devices have a retina display. Essentially, the screen resolution is still at 320x480 but the DPI is doubled, meaning the effective resolution is actually 640x960. Implementing for both these resolutions is very easy. Simply name all of your image files as normal, and then all of the double resolution files are named in the same way with the addition of an @2x
flag. So...