开发者

Android: Resolution Emulator vs. Device

I would like to test my app-layout with different resolutions. Therfore I created an emulator-device with a resolution of 480x832 (the same as my motorola droid/milestone).

I did all my layout_width with "fill_parent" or with dp - but what looks good on the device (e.g. filling up the whole width) is much too small in the emulator. fill_parent works, but layouts with dp are a lot different.开发者_开发技巧

What am I doing wrong?

Thanks a lot!


As Asahi pointed out in the comments, the density of the screen is also important. You should set that to 240, the density of the Droid. However, it is hard to emulate a phone screen exactly on a monitor because the monitor has a much lower pixel density. Therefore, your emulator will look very large in comparison to the actual device.

This article goes into more details on handling multiple screen sizes in the emulator.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜