0
votes

which type is drawable folder ? I know drawable-ldpi,drawable-mdpi,drawable-hdpi,drawable-xhdpi,drawable-xxhdpi, drawable-xxxhdpi and drawable-nodpi. But there is a folder just named drawable. So which is exactly its kind?

1

1 Answers

0
votes

The drawable directory is actually equivalent to drawable-mdpi. This equivalence is to maintain backwards compatibility (early versions of Android did not need to support multiple screen densities).

Commonsware wrote a good blog post that mentions the backward compatibility:

res/drawable/ is a synonym for res/drawable-mdpi/, for backwards compatibility with really old Android apps, written before we had density-specific resources.

Nowadays, it's useful for XML-defined drawables, e.g. shape or vector drawables:

Because one vector drawable can be used on all pixel densities, this file goes in your default drawables directory (you don't need to use density-specific directories):

res/
  drawable/
    ic_android_launcher.xml