I found this link Why don't some xhdpi mobiles display image located in /res/drawable only? and according to the answer "you should not put images files in the drawable folder". Is it true? there is a link in that answer but does anyone have an official reference on this matter. I search for an answer but still did't find any. Please help me to understand the drawable folder.
Asked
Active
Viewed 262 times
2 Answers
3
"you should not put images files in the drawable folder". Is it true?
It is not true, as long as you remember the fact the drawable is a shortcut for drawable-mdpi
, so your drawable as in fact been scaled density-wise.

Blackbelt
- 156,034
- 29
- 297
- 305
-
If it is a shortcut then do we need drawable-mdpi ?vise-versa and most importantly do we actually need drawable folder? Because drawable-mdpi can handle what drawable folder handles.(assuming other drawable folders have the same image).Then there is no need for drawable folder. can you please explain or give a link.Thanks @Blackbelt – SajithK Sep 21 '15 at 07:35
-
1*do we actually need drawable folder* I do use it for shapes for instance. *If it is a shortcut then do we need drawable-mdpi* it is for backwards compatibility and historical reasons. The very first releases of Android had not the qualifiers we are used to – Blackbelt Sep 21 '15 at 07:36
-
So I have this idea in my mind after what you said. Don't put any images in drawable folder(use it for shapes or other xml). If you put your images to every other drawables it is fine. So i think you can place your images in drawable folder but you don't have to. – SajithK Sep 21 '15 at 07:49
-
more or less. If you put your drawables there, they will be handle by the system like you put them on drawable-mdpi – Blackbelt Sep 21 '15 at 07:51
-
exactly @Blackbelt. I'm selecting your answer because it helps me lot. As final conclusion i will not place my images in drawble folder because drawable-mdpi will handle images for that and placing images in drawable folder is making the app size bigger. Thanks Blackbelt. – SajithK Sep 21 '15 at 07:56
1
Drawable folder is meant to hold images.
There are many drawable folder with customization, like
drawable-mdpi : devices which fall under medium density will take images from this folder.
drawable-mdpi-port : devices which fall under medium density and the orientation is portrait will take images from this folder.
Priority matters. Suppose the device is medium density and not in portrait mode, then it will take in drawable-mdpi.
The default folder is drawable, this folder will be in use under the following situations.
- If the device doesn't fall under the specified customization.
- If the item image is common for all density and resolutions.

Anitha Manikandan
- 1,160
- 7
- 19