Android layout on emulator vs device

安稳与你 提交于 2019-12-22 01:43:22

问题


I've created my app using all the neccessary things to support different screen sizes/densities (relative layouts, dip etc.)

I've created all the neccessary layout files (ldpi,mdpi etc) and images for this support.

I've tested the app on all the available emulator skins using Eclipse, and they all appear like the should. I then tested this on a real device (Samsung Galaxy SII) and it looked great. Then I tested it on a Galaxy Tab (7") and the layouts were a bit wrong, and the text sizes were wrong too, making it look really bad on the tablet.

I'm really confused by this, because it was tested using all of the emulator skins (this includes a 7" screen skin). I then created a custom AVD - (1024X600, 240 density), to match the exact specs of the galaxy tablet. This again looked as it should on the emulator, but the real device shows differently.

Any thoughts why this is? Shouldn't an emulator with the same specs of a real device look the same as the device?

Thanks


回答1:


Take a look at this post:

Android, concerning the User Interface design

You will note a comment from Tim where he mentions that the Galaxy Tab 7" has a large screen and uses the mdpi resources. So your emulator is setup for 1024x600 with hdpi, which would explain the difference.

Or just download/install the emulator from Samsung.

Emulate Samsung Galaxy Tab



来源:https://stackoverflow.com/questions/10057410/android-layout-on-emulator-vs-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!