I have a bunch of subfolders and I want to put them in the drawable folder so that I can support all screens is there another way I can do it because I read that you cant put subfolder but I want to support all screens
-
why do you need those to support all screens. http://developer.android.com/guide/practices/screens_support.html – Raghunandan Oct 21 '13 at 15:50
-
Just make a regular drawable folder in your res/ folder. – Andrew Schuster Oct 21 '13 at 15:51
-
Im going to have 9 folders and my Idea was to put on drawable-hdpi it folders with its images and 9 folders for drawable-ldpi etc. In my code I have it where depending on the number you get it will load you the images – user1975060 Oct 21 '13 at 15:57
-
I'm not sure what you're trying to do, but as you seem to know about the different drawable folders, the answer is simply that you can't have subfolders in drawable folders and you should probably name the files accordingly instead of adding subfolders (a_imagex, b_imagex...) to achieve whatever it is you try to achieve...? – jpm Oct 21 '13 at 16:13
4 Answers
You don't need subfolders in the drawable folder but different drawable-folders. Such as:
drawable-hdpi
drawable-xhdpi
drawable-mdpi
and have a look at the documentation in @Raghunandan's comment!

- 3,300
- 1
- 19
- 29
Refer to this answer which says
No, the resources mechanism doesn't support subfolders in the drawable directory, so yes - you need to keep that hierarchy flat.
From my own experiments it seems that having a subfolder with any items in it, within the res/drawable folder, will cause the resource compiler to fail -- preventing the R.java file from being generated correctly.

- 1
- 1

- 6,907
- 2
- 24
- 35
No sub-folders is required at all for supporting in all screen sizes. Just put your data's (images, icons etc.) on the default drawable folders [drwable-hdpi,drwable-ldpi,drwable-mdpi.. ].And don't forget to keep required sizes of the images,icons for different screens. For more details please follow this link.

- 23
- 1
- 5
Use the drawable
folder to support al screens.
Create one if it doesn't exist.

- 793
- 1
- 6
- 21