在两个不同的文件夹中使用相同的可绘制图像来支持所有平板电脑。(两个文件夹中的相同图像(无更改))

时间:2021-01-14 21:23:11

I want to keep same images in two folders drawable-large-xhdpi and drawable-xlarge-hdpi. avoiding duplication of images reduces memory How? I am having images of 1920x1080 resolution Any usefull answer i am very thankful to all. (example: if the image is half of screen width , it should be half of the screen in all tablets)

我想将相同的图像保存在两个文件夹drawable-large-xhdpi和drawable-xlarge-hdpi中。避免重复图像减少内存如何?我有1920x1080分辨率的图像任何有用的答案我非常感谢所有人。 (例如:如果图像是屏幕宽度的一半,它应该是所有平板电脑屏幕的一半)

1 个解决方案

#1


0  

If you want to keep exactly the same image in drawable-large-xhdpi and drawable-xlarge-hdpi then you apparently do not really understand what these xhdpi and hdpi selectors stands for, as image cannot be hdpi and xhdpi at the same time, so your approach is basically wrong. Please read this article to get the picture of how Android manages assets: http://developer.android.com/guide/practices/screens_support.html

如果你想在drawable-large-xhdpi和drawable-xlarge-hdpi中保留完全相同的图像,那么你显然不明白这些xhdpi和hdpi选择器代表什么,因为图像不能同时是hdpi和xhdpi,所以你的方法基本上是错误的。请阅读这篇文章,了解Android如何管理资产:http://developer.android.com/guide/practices/screens_support.html

EDIT

编辑

Here another article that you need to read to understand how Android picks assets and how it falls back in case of lack of such: http://developer.android.com/guide/topics/resources/providing-resources.html#BestMatch that will help you organize your assets correctly

这里有另一篇文章,您需要阅读以了解Android如何选择资产以及如何在缺少此类资产的情况下退出:http://developer.android.com/guide/topics/resources/providing-resources.html#BestMatch that将帮助您正确组织资产

#1


0  

If you want to keep exactly the same image in drawable-large-xhdpi and drawable-xlarge-hdpi then you apparently do not really understand what these xhdpi and hdpi selectors stands for, as image cannot be hdpi and xhdpi at the same time, so your approach is basically wrong. Please read this article to get the picture of how Android manages assets: http://developer.android.com/guide/practices/screens_support.html

如果你想在drawable-large-xhdpi和drawable-xlarge-hdpi中保留完全相同的图像,那么你显然不明白这些xhdpi和hdpi选择器代表什么,因为图像不能同时是hdpi和xhdpi,所以你的方法基本上是错误的。请阅读这篇文章,了解Android如何管理资产:http://developer.android.com/guide/practices/screens_support.html

EDIT

编辑

Here another article that you need to read to understand how Android picks assets and how it falls back in case of lack of such: http://developer.android.com/guide/topics/resources/providing-resources.html#BestMatch that will help you organize your assets correctly

这里有另一篇文章,您需要阅读以了解Android如何选择资产以及如何在缺少此类资产的情况下退出:http://developer.android.com/guide/topics/resources/providing-resources.html#BestMatch that将帮助您正确组织资产