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)
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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
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