凭借在绘制文件夹的默认资源(MDPI大小)什么绘制,MDPI文件夹的地步?文件夹、地步、大小、资源

由网友(埘間の誋憶)分享简介:我有全套的图像在各种不同的像素密度,而且我需要把位图资源投入到可绘制文件夹(在MDPI)作为默认的资源使用(以prevent崩溃的像素密度设备的I '已经没有照顾到,比如xhdpi),但是这意味着复制资源的绘制,MDPI到绘制文件夹。I've a full set of images at the various d...

我有全套的图像在各种不同的像素密度,而且我需要把位图资源投入到可绘制文件夹(在MDPI)作为默认的资源使用(以prevent崩溃的像素密度设备的I '已经没有照顾到,比如xhdpi),但是这意味着复制资源的绘制,MDPI到绘制文件夹。

I've a full set of images at the various different pixel densities, and I need to put bitmap resources into the drawables folder (at MDPI) to use as default resources (to prevent crashing on pixel density devices I've not catered to, e.g. xhdpi), but that means duplicating the resources in the drawable-mdpi into the drawable folder.

因此​​,作为复制显然是不好的,我不知道我是否应该只是删除绘制-MDPI文件夹,并把我的MDPI资源中(默认)绘制的文件夹

So as duplication is clearly bad, I'm wondering whether I should just delete the drawable-mdpi folder, and keep my MDPI resources in the (default) drawable folder

还是我失去了一些东西?

Or am I missing something?

推荐答案

您不必重复你的资源。一个好的做法是做到以下几点: - 把所有非基于图像的可绘里RES /绘制/(例如所有的XML可绘) - 把所有基于图像的可绘(图片以及9补丁)内RES /绘制-MDPI,RES /绘制,华电国际等

You don't need to duplicate your resources. A good practice is to do the following: - Put all non image-based drawables inside res/drawable/ (for instance all your XML drawables) - Put all image-based drawables (images and 9-patches) inside res/drawable-mdpi, res/drawable-hdpi, etc.

阅读全文

相关推荐

最新文章