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 密度
基础教程推荐
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
