How to set up android emulator for a specific android device

♀尐吖头ヾ 提交于 2019-12-11 18:05:22

问题


How do I set up emulator for specific android device? I mean how to properly get Abstracted screen density and screen size? Is there any online resource which can provide info about these constants?


回答1:


Ya, Google it for your answer.

This link here have a few common phones. See if it matches your needs.

http://mobile.tutsplus.com/tutorials/android/common-android-virtual-device-configurations/

In this wiki page, you can get some resolution and density. For example, samsung phones:

http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density#Samsung




回答2:


Yes, it's called Google and math:)

Goole the name of your target device. Get its specs, resolution width and height and screen size. Then the density, which is expressed in dots(pixels) per inch is obtained by simply calculating the total number of pixels for the given screen size and reporting that to one square inch.

At any rate, don't get your hopes high about using the emulator to actually (realistically) simulate real devices. The emulator is slow as hell (to the point where a blank OpenGL surface will be drawn at 2 FPS). Your best bet is to get the actual physical device you need. Second best is to use Android x86 though that one has other issues (but runs generally faster than the default emulator).



来源:https://stackoverflow.com/questions/9722962/how-to-set-up-android-emulator-for-a-specific-android-device

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