1

Possible Duplicate:
Can The Android drawable directory contain subdirectories?

How to organize graphics/java/xml file in folders in android project in eclipse? I mean - should I (to store graphics) create folder in my 'drawable-mdpi' or as a separated folder?

I tried making folder in drawable and calling file by:

@drawable/photo/fileName

also tried making separate folder in /res, and call by:

@photo/fileName

but with no success.

Community
  • 1
  • 1
Michał Tajchert
  • 10,333
  • 4
  • 30
  • 47

2 Answers2

2

You don't need/can't use a separate folder. Just put in each drawable folder and access with @drawable/filename with no extension

codeMagic
  • 44,549
  • 13
  • 77
  • 93
2

should I (to store graphics) create folder in my 'drawable-mdpi' or as a separated folder?

Sadly, you cannot create your own file structure in the /res folder... You must use the existing folder structure, like /res/drawable-mdpi and use R.drawable.xxx.

You can read about this "bug" here: Android layout folder organization or read the brief explanation straight from a lead Android programmer: Can The Android drawable directory contain subdirectories?.

Community
  • 1
  • 1
Sam
  • 86,580
  • 20
  • 181
  • 179