I have a SQLite database and one of the tables has a column that is the string name of a jpeg file..
For instance the column is called "PhotoID" and a record value is say "photoone.jpg" I have strored all the actual jpegs in the drawable resouce directory. I would like to be able to programmatically access the resources with having to prep or setup the link. I have about 100 photos but do want to setup a link to the actual resource id. For instance the R class has the following setting ====================================== public static final int david_beckham=0x7f020011; I have created a record in my DB as follows; "INSERT INTO Celebrity_Trump_Raw_Data (Rank, CelebrityName, PayMil, WebRank, PressRank, TVRank, PhotoId) VALUES ('5', ' David Beckham', 50, '10', '3', '18', 'David_Beckham.jpg');", I would like to do something like this: int curr_pic_res = R.drawable.(String.tolower(Celeb.PhotoID)); Is this possible or do I have to create the resource links manaully. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---