来自于mdpi加载,而不是华电国际可绘制 [英] Drawable from mdpi loading instead of hdpi

查看:99
本文介绍了来自于mdpi加载,而不是华电国际可绘制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经建立了我不同的绘制资源目录(LDPI,MDPI和HDPI)项目。我有一个背景有两个不同的分辨率巴布亚新几内亚:在小320x480绘制-MDPI文件夹,在480x800的绘制,华电国际。两者有相同的文件名。当我尝试加载背景在清单样式(采用了android:windowBackground在款式),如果我用模拟器1.6设备,我得到正确的加载(MDPI)。不过,如果我尝试这对我的Nexus,我看到,首先从华电国际文件夹的正确后台加载,但很快切换到MDPI之一。我曾尝试也设立在布局xml文件的背景(机器人:SRC = ...),但在这种情况下,只有MDPI一个加载。如果我删除MDPI版本,一切都装好。对什么是问题的任何想法?为什么它装载于mdpi绘制?

I have set up my project with different drawable directories (ldpi, mdpi and hdpi). I have a background png with two different resolutions: 320x480 in drawable-mdpi folder, and 480x800 in drawable-hdpi. Both have the same filename. When I try to load the background as a style in the manifest (using android:windowBackground in the style) if I use the emulator for a 1.6 device, I get the correct one loaded(mdpi). However, if I try this on my Nexus, I see that at first the correct background from the hdpi folder is loaded, but it quickly switches to the mdpi one. I have tried also to set up the background in the layout xml file (android:src=...) but in this case only the mdpi one is loaded. If I delete the mdpi version, everything is loaded ok. Any idea on what is the problem? why is it loading the mdpi drawable?

推荐答案

在清单文件:

  <supports-screens
      android:anyDensity="true"/> 

希望这hepls

Hope this hepls

这篇关于来自于mdpi加载,而不是华电国际可绘制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆