-13

I created a folder in res folder and it named draw2 which i will use for specisific imageviews.I want to access the images inside this folder how to do it?

Sandeep Singh
  • 745
  • 4
  • 20
Alber Levi
  • 29
  • 1
  • 7

3 Answers3

3

You cannot. Custom folders in res folder are not supported.

Cililing
  • 4,303
  • 1
  • 17
  • 35
0

Just Put the images you trying to access into your (drawable) folder, because in android the res folder has specific folder names like (values,mipmap,anim,drawable ...) , and you can't create new folder name , it will not be recognized.

0

I created a folder in res folder and it named draw2 which i will use for specisific imageviews.

Custom folders in res folder are not supported. Better To create raw folder or asset folder for this purpose

raw/

Arbitrary files to save in their raw form. To open these resources with a raw InputStream, call Resources.openRawResource() with the resource ID, which is R.raw.filename.

How to create assets in android studio

How to create raw in android studio

for more information The Android Project View

module-name/

    build/

    libs/

    src/
          androidTest/
          main/
                AndroidManifest.xml
                java/
                jni/
                gen/
                res/
                assets/
          test/
    build.gradle (module)
build.gradle (project)
AskNilesh
  • 67,701
  • 16
  • 123
  • 163