0

I know how to add photos to drawable folder and read them from it .. but in my case I have many folders each of them contains photos ..

so, how to add all the folders to my project in android studio

folder1 folder2 folder3 ..

and how to read get photos from them, for example: in drawable we use : R.drawable.photo1

so, how to do that in my case ..

and thanks in advance.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Dev
  • 45
  • 1
  • 12
  • 2
    I didn't completely understand your question, you can create folders under /res/ folder from there you can access them by using R.foldername.photoname – Anton Makov Mar 31 '18 at 18:33
  • when I copy the folder and paste it in /res .. the folder added to /res .. but it doesn't show up in android studio ..and when I want read from it he didn't find the forlder – Dev Mar 31 '18 at 18:38
  • 2
    Possible duplicate of [Can the Android drawable directory contain subdirectories?](https://stackoverflow.com/questions/1077357/can-the-android-drawable-directory-contain-subdirectories) – Morrison Chang Mar 31 '18 at 18:40
  • @Dev I guess you passed it from the outside, if so just refresh the res folder or reset android studio then you will have access to it – Anton Makov Mar 31 '18 at 18:43
  • @AntonMakov Sadly, it doesn't work – Dev Mar 31 '18 at 18:56
  • Try to close the project and reopen it if it's still doesn't work. Try to create a new project and create the hierarcy that I told you before – Anton Makov Mar 31 '18 at 19:00

0 Answers0