2012-10-16 30 views
1

我有一个大图像标志我正在缩放(通常是缩小)以填充屏幕的50%。起初,我把它放在底座/ res/drawable文件夹中。它在大多数设备上运行良好,但在一些带有小屏幕的低端手机上,缩放引入了混叠,并且看起来很可怕。因此,我分布图像,如下所示:资源文件夹选择不按预期方式工作

/res/drawable 
     -Large image, intended to be used on most devices 
    /res/drawable-normal 
     -Smaller image, intended to target smaller screens 

然而,在三星Galaxy Tab 2 10' 它选择普通文件夹中而不是在基座可绘制文件夹中的图像中的图像进行测试时。我知道这款平板电脑适合drawable-xlarge类别,因为它从那里选择其他资源。于是,我只好想出这个目录结构的东西的工作:

/res/drawable 
     -Large image, intended to be used on most devices 
    /res/drawable-normal 
     -Smaller image, intended to target smaller screens 
    /res/drawable-xlarge 
     -Same image as the drawable base folder, only used for the tablet to select the correct image. 

现在的作品,因为我想,但我不明白为什么系统会选择普通文件夹为XLARGE设备。它不应该首先在xlarge文件夹中查看,然后回退到基本可绘制文件夹上吗?

在此先感谢。

+1

它落在一个可扩展的曼呃。显然,如果它找不到Xlarge,那么大是更接近的匹配,然后正常匹配,然后默认文件夹.. – Blundell

+0

@Blundell你可能想发表您的评论作为答案,以便它可以被标记为已解决。 –

+0

以为有人可能想要提供更多的细节,所以只留下它作为评论:-) – Blundell

回答