Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create folder in drawable

Tags:

android

Is it possible to create our own folder in drawable and put all my images in that folder as:

"drawable\Myimages\p.png.."

If it possible than how can i use this images in my activity..gnerally we use "R.drawablw.p" but now how that can be written because now my images is in drawable\Myimages directory

please suggest me..

with regards Anshuman

like image 869
AndroidDev Avatar asked Aug 10 '11 06:08

AndroidDev


2 Answers

No, you can't create your own file hierarchy in drawable directory.

But you can see in http://developer.android.com/guide/topics/resources/providing-resources.html:

However, if you need access to original file names and file hierarchy, you might consider saving some resources in the assets/ directory (instead of res/raw/). Files in assets/ are not given a resource ID, so you can read them only using AssetManager.

If you have very many resources, it can be useful for you.

like image 66
Andrei Buneyeu Avatar answered Nov 03 '22 22:11

Andrei Buneyeu


No, the resources mechanism doesn't support subfolders in the drawable directory.You can't used.

like image 28
Uttam Avatar answered Nov 03 '22 21:11

Uttam