资源文件夹的正确名称

| 我在大hdpi和xlarge mdpi屏幕上都有一组可绘制的资源,并且我不想在不同的文件夹中将它们加倍,所以我应该如何命名我的文件夹以使两个设备都从中获取资源。现在我有了drawable-mdpi,drawable-hdpi,drawable-large-hdpi和drawable-xlarge-mdpi文件夹,最后两个包含相同的集合。提前致谢。     
已邀请:
当您具有一组通用的可绘制对象时,只需将它们放在“ 0”文件夹中即可。     
这实际上是一个很有趣的问题。据我所知,我认为没有一种命名方法可以解决该问题。 通过为可绘制对象使用别名,您也许可以提出解决方案。然后,您可以使用唯一的名称命名所有可绘制对象,然后在不同的分辨率文件夹中创建一个别名,以引用正确的图像。
To create an alias to an existing drawable, use the <bitmap> element. For example:

<?xml version=\"1.0\" encoding=\"utf-8\"?>
<bitmap xmlns:android=\"http://schemas.android.com/apk/res/android\"
    android:src=\"@drawable/icon_ca\" />

If you save this file as icon.xml (in an alternative resource directory, such as res/drawable-en-rCA/), it is compiled into a resource that you can 
reference as R.drawable.icon, but is actually an alias for the R.drawable.icon_ca resource (which is saved in res/drawable/).
您可以在以下位置阅读更多内容 http://developer.android.com/guide/topics/resources/providing-resources.html     

要回复问题请先登录注册