开发者

Android: Resolution Emulator vs. Device

开发者 https://www.devze.com 2023-01-20 11:24 出处:网络
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 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

精彩评论

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