-1

I created a project in android studio using Kotlin

I try now to organise my files in the "res" area. in drawable, there is a lot of png files ( icons used in my app ), and a lot of custom controls: xml files, using shape, solid, stoke...

when I try to create a new resource directory, using "resource type" = drawable : it does not compile : "shape" "solid", etc... are not recognized anymore during compilation. android studio require me to put ALL my shape in drawable folder, which start to be a big mess.

how can I add several folder in res area. I want to separate properly the icons, the xml files in separate folder ?

thanks for any help.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
  • 2
    Does this answer your question? [Can the Android drawable directory contain subdirectories?](https://stackoverflow.com/questions/1077357/can-the-android-drawable-directory-contain-subdirectories) – Elton Viana Feb 16 '20 at 18:58

1 Answers1

1

Unfortunately, Android don't let you do that, all drawables must be in the drawable folder - and we can't create subdirectories (Can the Android drawable directory contain subdirectories?).

In order to be able to manage all this mess, I recommend prepending the drawable type to the name, so you have:

icon_my_icon_name
shape_my_shape_name
solid_my_solid_name
...
Elton Viana
  • 171
  • 1
  • 7