Abstracted LCD Density(抽象的 LCD 密度)
问题描述
如何计算 AVD 的抽象 LCD 密度?
How do you calculate the Abstracted LCD Density for an AVD ?
推荐答案
抽象 LCD 密度以每英寸点数为单位(请参阅 docs).
The Abstracted LCD Density is measured in dots per inch (see the docs).
维基百科关于像素密度的文章有一个有用的部分解释了如何计算这个:基本上沿对角线每英寸的像素数可以通过这个公式计算,其中 x
和 y
是水平和垂直分辨率(因此 sqrt(x*x + y*y)
是以像素为单位的对角线长度),d
是以英寸为单位的对角线长度:
The wikipedia article on Pixel density has a helpful section explaining how to calculate this: basically the number of pixels per inch along the diagonal can be calculated by this formula, 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:
sqrt(x*x + y*y)/d
例如,LG Optimus One P500 被列为有屏幕320
的分辨率为 480
,屏幕对角线尺寸为 3.2
英寸,因此它的密度非常接近 180dpi代码>.
So for example, a LG Optimus One P500 is listed as having a screen resolution of 320
by 480
, and a diagonal screen size of 3.2
inches, so it would have a density very close to 180dpi
.
这篇关于抽象的 LCD 密度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:抽象的 LCD 密度


- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01