tags:

views:

201

answers:

2

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 some body suggest me how should i make a design so that it could be used in iphone and android.

+2  A: 

dip is not simply the same as 1.5 pixels. A dip is a density independent pixel, and allows you to size items in a way so that they will look similar on displays with different pixel densities. When performing the layout Android scales the dip value depending on the pixel density of the device.

However, dip works best when sizing items which scale well, like the Android widgets. If you have an image you may want to always display it "actual size" so the image doesn't get scaled and become blurry - i.e. size it in pixels and not dip. So what you may have to do is supply a number of versions of each image so that you have a version that looks good for the screen densities on all the devices you choose to support. This is turn may mean producing a number of different layouts, depending on how you use your images.

Dave Webb
thanx dave for your answer..ya i read the concept of dip but may be i am not clear how to use it.Suppose i make a button of 100px X 20px with resolution 72.It seems fine in iphone application but when used in android it seems smaller and blurred. So Dave plz suggest me what resolution should i use for above button in photoshop?
damodar
@damador - I don't use Photoshop so I can't help you with that. What happens if you size the button the same size as the image, ie. 100x20px?
Dave Webb
i did the same but it doesn't work.It is fine with iphone but smaller in android...i.e not as equal as 100 X 20..i'm really in tension coz i have to finish my android apps in deadline..
damodar
@damodar - __Edit__ your question and add the XML of the layout you're using. If possible post links to the image file and a screenshot of the layout running in the emulator.
Dave Webb
A: 

I think it is not a big problem.You just copy your all images from drawable-hdip from drawabel-mdpi.It will work fine.

RBADS