You can read your images from the assets directory. It's not the same as the res/drawable but you should still be able to read and use a Drawable (image) from assets. I'm not sure if you can scan assets though to look for new files (I could very well be wrong about that, as I haven't tried).
Another option would be to keep an array of the drawable IDs in a separate XML file (array value?) and use that to know what drawables you have. It's not as easy as just dropping one in but is only a single point of code to edit. - Brill On Dec 12, 11:17 pm, darrinps <darri...@gmail.com> wrote: > Is there any way for an Android app to read the file names of all the > files stored under drawable (or for that matter any other directory)? > > I'd like to have it so I can plop in a new file and have the app read > the name for me for use in a dynamically sized list of radio buttons > (one button per file) that lists the name of the file by the radio > button. > > I've done something like this with contacts, but I am not sure how you > read the file names from something like the drawable directory! > > Thanks. > > Darrin -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en