Android xxhdpi,420 dpi和480 dpi [英] Android xxhdpi, 420 dpi and 480 dpi
问题描述
我面临下一个问题:
我有一个values-xxhdpi及其Dimensions.xml。 480 dpi的设备可以在此文件夹下很好地工作。
I have a values-xxhdpi with their dimensions.xml. Devices with 480 dpi work great with this folder.
问题是例如Samsung Galaxy S4或S5从此文件夹中捕获值,并且在屏幕上看起来不佳,因为它们具有420 dpi。因此,我需要为该类型或设备创建一个values-something。
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. So I need to create a values-SOMETHING to this type or devices.
我尝试添加values-w410dp并正常工作,但是如果我将此文件夹添加到480设备上dpi现在可以从此文件夹中捕获值,而不是值xxhdpi中的值。
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.
请添加提示
谢谢
推荐答案
您必须为具有不同dpi的不同屏幕尺寸创建尺寸资源文件。
You have to create dimension resource files for different screen sizes with different dpi.
如您所见:
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.
这篇关于Android xxhdpi,420 dpi和480 dpi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!