Android xxhdpi, 420 dpi and 480 dpi

て烟熏妆下的殇ゞ 提交于 2019-12-10 19:27:28

问题


I'm facing the next problem:

I have a values-xxhdpi with their dimensions.xml. Devices with 480 dpi work great with this folder.

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.

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.

Please need sugestions

Thanks


回答1:


You have to create dimension resource files for different screen sizes with different 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.



来源:https://stackoverflow.com/questions/42253607/android-xxhdpi-420-dpi-and-480-dpi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!