简体   繁体   English

Android xxhdpi,420 dpi和480 dpi

[英]Android xxhdpi, 420 dpi and 480 dpi

I'm facing the next problem: 我正面临下一个问题:

I have a values-xxhdpi with their dimensions.xml. 我有一个带有dimension.xml的values-xxhdpi。 Devices with 480 dpi work great with this folder. 具有480 dpi的设备可以很好地使用此文件夹。

The problem is that for example Samsung Galaxy S4 or S5 catch the values from this folder and not look well in screen because they have a 420 dpi. 问题是,例如三星Galaxy S4或S5捕获此文件夹中的值并且在屏幕上看起来不太好,因为它们具有420 dpi。 So I need to create a values-SOMETHING to this type or devices. 所以我需要为这种类型的设备创建一个值-SOMETHING。

I try adding values-w410dp and work fine, but if I add this folder the devices with 480 dpi now catch de values from this folder and not the values from the values-xxhdpi. 我尝试添加值-w410dp并且工作正常,但是如果我添加此文件夹,那么480 dpi的设备现在会从此文件夹中捕获de值,而不是值-xxhdpi中的值。

Please need sugestions 请需要sugestions

Thanks 谢谢

You have to create dimension resource files for different screen sizes with different dpi. 您必须为具有不同dpi的不同屏幕大小创建维度资源文件。

As you can see here: 正如你在这里看到的:

android:screenSize=   ["small"| "normal" | "large" |     "xlarge"     ]

android:screenDensity=["ldpi" |   "mdpi" | "hdpi"  | "xhdpi"| "xxhdpi"]

            dpi   [ "280" | "360"| "420"| "480" | "560" ] 

Add your screen dimension with density and define your attributes. 使用密度添加屏幕尺寸并定义属性。

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

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