Is it possible to add a custom folder inside 'drawable' folder of an Android app?
I created this folder, tab_bar, inside 'drawable' and added barbgnd.png. And then in my code, I tried to access it using
android:background="@drawable/tab_bar/barbgnd"
However, I go开发者_运维问答t this error
error: Error: No resource found that matches the given name (at 'background' with value '@drawable/tab_bar/barbgnd').
My objective is to further organize the files inside the drawable folder.. i.e. all images used in a Navigation Bar component in one folder, etc.
Is this not possible?
Thanks!
You're not allowed to create subfolders at drawable folder. I usually use naming prefix to organize files, i.e. navigaton_left.png, navigation_right.png etc.
精彩评论