I have a folder structure inside my various drawable folders, e.g. drawable, drawable-hdpi etc.
Something like:
drawable-hdpi
├── folder_main
│ ├── sub_folder_1
│ │ ├── 1.png
│ │ └── 2.png
│ ├── sub_folder_2
│ │ ├── 1.png
│ │ └── 2.png
│ └── sub_folder_3
│ ├── 1.png
│ └── 2.png
└── ic_launcher.png
Accessing these resources will be dynamic and done programatically. I need a way to access these sub folder png resources.
Accessing the ic_launcher
is straight forward using: R.drawable.ic_launcher
. Logically I think you should be able to access the resource somthing like:
R.drawable.folder_main.sub_folder_1.1
But that clearly doesn't work and wouldn't work programatically where the sub folder and file is dynamic.
Thanks in advance for any pointers.