Android: retrieving all Drawable resources from Resources object
Posted
by
Matt Huggins
on Stack Overflow
See other posts from Stack Overflow
or by Matt Huggins
Published on 2010-07-11T02:17:56Z
Indexed on
2010/12/25
20:54 UTC
Read the original article
Hit count: 623
In my Android project, I want to loop through the entire collection of Drawable
resources. Normally, you can only retrieve a specific resource via its ID using something like:
InputStream is = Resources.getSystem().openRawResource(resourceId)
However, I want to get all Drawable
resources where I won't know their ID's beforehand. Is there a collection I can loop through or perhaps a way to get the list of resource ID's given the resources in my project?
Or, is there a way for me in Java to extract all property values from the R.drawable
static class?
© Stack Overflow or respective owner