EDIT
Everyone can try to make an emulator for this phone http://www.gsmarena.com/htc_chacha-3787.php to see what I mean. The icons will be huge and the screen you get is not the same as on the real phone.
Here are the specs:
Display: TFT capacitive touchscreen, 256K colors
Size: 480 x 320 pixels, 2.6 inches (~222 ppi pixel density)
I tried to make an emulator for a specific Android phone, but the resolution was all wrong. So I will write what I did, and I hope someone will correct me.
First I go to GSMArena.com and pick some phone (I'll use a random here)
Sony Ericsson Xperia PLAY
I see that the size of the screen is 480x854 with a density of 245 ppi.
Then I create a new emulator machine with WVGA854 (LARGE type of screen) and I manually set the DPI to 245 (HDPI).
Is this correct: 245ppi == 245dpi?
Sometimes this works, but most times, I get big icons on a small screen, especially when I try to make an emulator for NORMAL screen phones which have resolution of around 240ppi. When I compare such screen on the emulator with the original phone screen snapshots, I see it's just not the same.
So what is the best way, to create an emulator, for a specific mobile phone, so that it exactly match the manufacturer's screen size and pixel density?
Go to Eclipse
Window - Android SDK and AVD Manager - New
in Skin
select Resolution
and give 480 X 854
and in Hardware
click on New
select "Abstract LCD Density" and change it's value to Density you get from below formula (if its given in ppi
in the device specification) or keep it as it is if given in LCD density.
and then start that AVD.
EDIT
Yes you are right and I search a bit more and found Formula to Convert PPI to Abstact LCD Density here in this answer.
sqrt(xx + yy)/d
where x and y are the horizontal and vertical resolution (so that sqrt(xx + yy) is the length of the diagonal in pixels), and d is the length of the diagonal in inches.
Hope this ends your search now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With