如何使仿真器用于特定的设备分辨率(HTC双查)? [英] How to make an emulator for specific device resolution(HTC Cha-Cha)?

查看:148
本文介绍了如何使仿真器用于特定的设备分辨率(HTC双查)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

修改

每个人都可以尝试让仿真器这款手机 http://www.gsmarena.com/ htc_chacha-3787.php 以明白我的意思。该图标将是巨大的,你得到的画面是不一样的真正的手机上。

下面是规格:
显示:TFT电容式触摸屏,256K色
尺寸:480×320像素,2.6英寸(〜222 ppi的像素密度)


我试图让一个模拟器特定的Andr​​oid手机,但分辨率是完全错误的。所以,我会写我做什么,我希望有人会纠正我。

首先,我去的 GSMArena.com 的,并挑选一些电话(我将使用一个随机位置)

索尼爱立信Xperia PLAY

我看到屏幕的尺寸是为480x854与245 ppi的密度。

然后,我创建一个新的模拟器机WVGA854(大型屏幕),我手动设置DPI为245(华电国际)。

这是正确的:?245ppi == 245dpi

有时候这工作,但大部分时间,我弄大图标上的小屏幕,尤其是当我试图让一个模拟器师范大学屏手机其中有大约240ppi的分辨率。当我在与原来的手机屏幕快照模拟器比较这种屏幕,我看到它只是不一样的。

那么,什么是最好的方式,创造一个仿真器,为特定的手机,所以它的完全匹配制造商的屏幕尺寸和像素密度

解决方案

进入到Eclipse

 窗口 -  Android SDK和AVD管理器 - 新
 

护肤选择分辨率,并给予480 * 854

硬件点击选择摘要LCD密度,并改变它的价值密度从获得下面的公式(如果它在 PPI 在设备说明书中给出),或保持它,因为它是,如果在LCD密度给出。

然后再启动AVD。

修改

是的,你是对的,我查了一下越来越发现公式转换PPI在这里Abstact液晶密度的这个答案

  

的sqrt(X * X + Y * Y)/ D

其中x和y是水平和垂直分辨率(因此的sqrt(X * X + Y * y)为以像素为对角线的长度),d为对角线以英寸的长度。

希望这将结束搜索了。

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(x*x + y*y)/d

where x and y are the horizontal and vertical resolution (so that sqrt(x*x + y*y) is the length of the diagonal in pixels), and d is the length of the diagonal in inches.

Hope this ends your search now.

这篇关于如何使仿真器用于特定的设备分辨率(HTC双查)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆