简体   繁体   English

如何根据DPI值对Android设备进行分类?

[英]How to classify Android Devices based on DPI values?

In Android, various devices are classified into different categories based on their density. 在Android中,各种设备根据其密度分为不同的类别。

LDPI = 120 DPI
MDPI = 160 DPI
HDPI = 240 DPI
XHDPI = 320 DPI
XXHDPI = 480 DPI
XXXHDPI = 640DPI

Here my doubt is, if an Android device has density as "200 DPI", will it falls under which of the above category? 我怀疑的是,如果Android设备的密度为“200 DPI”,它会属于上述哪个类别? (example: Nexus 5 have 217dpi,whether it'll come under HDPI or MDPI). (例如:Nexus 5有217dpi,无论它是否属于HDPI或MDPI)。

Can anyone say, what is the exact range for different densities(LDPI,MDPI,XXHDPI.....). 谁能说,不同密度的确切范围是什么(LDPI,MDPI,XXHDPI ......)。

It's not one density but rather ranges (often called "buckets"). 它不是一个密度而是范围(通常称为“桶”)。 This is documented here and this picture I post below should explain how to classify it correctly (it lacks xxhdpi and xxxhdpi though, but the rule is the same) 这是在这里记录的 ,我在下面发布的这张图片应该解释如何正确分类(虽然它缺少xxhdpixxxhdpi ,但规则是相同的)

在此输入图像描述

TVDPI is around 200, and it uses the HDPI. TVDPI大约是200,它使用HDPI。 I posted a question a while ago about DPI here and got no answers. 我刚刚在这里发布了一个关于DPI的问题并没有得到答案。

In this table , devices in that range are classified as TVDPI, and the docs says that it is not necessary to have this folder and it uses images in the HDPI folder and downsizes them. 此表中 ,该范围内的设备被归类为TVDPI,文档说没有必要拥有此文件夹,它使用HDPI文件夹中的图像并缩小它们的尺寸。

在此输入图像描述

If you notice this image you will come to know 如果您注意到这张图片,您就会知道

ldpi    100 - 140   
mdpi    141 - 199   
hdpi    200 - 319   
xhdpi   320 - 340

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

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