Issue
I've a project structure like that:
The folder "coffee_types" is an Android resource folder with type drawable created in the following way:
Previously, when I was using only main drawables folder, I was using this function to get the Drawable object:
private Drawable getDrawableByName(String name) {
return getResources().getDrawable(getResources().getIdentifier(name, "drawable", getPackageName()));
}
I was trying to change it to make it work with the "coffee_types" folder with no success.
Any help appreciated.
Solution
The folder "coffee_types" is an Android resource folder with type drawable
No, it is not. You cannot invent your own resource types.
Answered By - CommonsWare
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.