tags:

views:

71

answers:

1

Duplicate: Image compatibility in iphone and android

I developed UI for iPhone apps and now want to use the same UI in Android apps. I read that Android use dip for image resolution and I also read that 1 dip=1.5 pixel. I simply multiply the image size by 1.5px. Now the problem is that the image is blur and not as clear as in iPhone apps. So, will somebody suggest how I should make a design so that it could be used on iPhone and Android.

Note: I use Photoshop for UI developement. It would be better if suggested with reference to Photoshop CS4.

+1  A: 

Actually, 1 dip doesn't equal 1.5 pixels. From the docs:

A virtual pixel unit that applications can use in defining their UI, to express layout dimensions or position in a density-independent way.

The density-independent pixel is equivalent to one physical pixel on a 160 dpi screen, the baseline density assumed by the platform (as described later in this document). At run time, the platform transparently handles any scaling of the dip units needed, based on the actual density of the screen in use. The conversion of dip units to screen pixels is simple: pixels = dips * (density / 160). For example, on 240 dpi screen, 1 dip would equal 1.5 physical pixels. Using dip units to define your application's UI is highly recommended, as a way of ensuring proper display of your UI on different screens.

That page has all the info you need to understand Android's dimensions, but the short answer is that you won't be able to make them 1:1 identical as Android supports more than just 320x480.

fiXedd