Android设备的屏幕尺寸 [英] android device screen size
本文介绍了Android设备的屏幕尺寸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要一种方法来检测设备的屏幕大小和密度与亚行。 如果没有解决方案,我在哪里可以得到所有现有的Android设备的完整列表,他们的屏幕大小和密度?
I need a way to detect device screen size and density with adb. If there is no solution, where can I get the complete list of all existing android device with their screen size and density ?
推荐答案
LCD密度在build.prop:
LCD density is in the build.prop:
adb shell getprop ro.sf.lcd_density
和分辨率availble的输入活动的dumpsys:
And the resolution is availble in the dumpsys of the input activity:
# windows
adb shell dumpsys window | find "DisplayWidth"
# linux
adb shell dumpsys window | grep DisplayWidth
它适用于所有我已经与测试设备(2.2,2.3.3,2.3.4,4.0.3;宏碁Liquid E,HTC野火S,HTC Incredible S的,摩托罗拉Atrix 4G,三星Galaxy Note,三星Galaxy Nexus的),以及模拟器,虽然仿真器的输出的太干净,作为一个很好的例子解析的。
这篇关于Android设备的屏幕尺寸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文