简体   繁体   English

不同的DPI屏幕分辨率(PIXELS)

[英]Different DPI Screen Resolutions (PIXELS)

i just wanted to know. 我只是想知道。 i've read about this DPIs and i wandered all of the varieties. 我已经读过有关DPI的信息,并且在所有品种中徘徊。 since i am new to this, i need some knowledge and i hope someone can help me out. 由于我是新手,因此我需要一些知识,希望有人能帮助我。 so far i've seen LDPI, MDPI, HDPI, XHDPI, XXHDPI, XXXHDPI. 到目前为止,我已经看到LDPI,MDPI,HDPI,XHDPI,XXHDPI,XXXHDPI。

is there any other DPI variety other than this. 除此之外,是否还有其他DPI品种。 and what is their respective resolutions ?. 以及它们各自的解决方案是什么? like as for qHD = 960 x 540 etc etc. i hope you understand guys, thanks. 例如qHD = 960 x 540等,我希望您能理解,谢谢。

please forgive me if my grammar is a little crappy, as english is not my native language 如果我的语法有点烂,请原谅我,因为英语不是我的母语

Android supports different screen resolutions Android支持不同的屏幕分辨率

ldpi (low) ~120dpi
mdpi (medium) ~160dpi
hdpi (high) ~240dpi
xhdpi (extra-high) ~320dpi
xxhdpi (extra-extra-high) ~480dpi
xxxhdpi (extra-extra-extra-high) ~640dpi

1 dpi = 1 design independent pixel 1 dpi = 1个设计独立像素

ldpi device have 120 pixels in 1 inch size. ldpi设备具有1英寸大小的120像素。

same for other densities... 其他密度相同...

we as programmer should use this conversion formulae : 我们作为程序员应该使用以下转换公式:

pixel = dp * (density / 160) 像素= dp *(密度/ 160)

so 240 dpi hdpi device's 1 dp will have = 1 * (240/160) = 3/2 = 1.5 pixels 因此240 dpi hdpi设备的1 dp将具有= 1 *(240/160)= 3/2 = 1.5像素

and 240 dpi xxhdpi device's 1 dp will have = 1 * (480/160) = 3 pixels 和240 dpi xxhdpi设备的1 dp将具有= 1 *(480/160)= 3像素

Using this 1.5 and 3 pixels knowledge, programmer can design layouts for different densities 利用这一1.5和3像素的知识,程序员可以设计不同密度的布局

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM