Thank you guys! I've tried with both methods! getIdentifier() works good, but I don't find how to express filepath in BitmapDrawable!
BitmapDrawable bd = new BitmapDrawable(filepath + filename + ".png"); image.setImageDrawable(bd); I've tried with: filepath="/res/drawable/" filepath="/drawable/" filepath="/src/res/drawable/" But no one works! On Apr 13, 8:28 pm, "Dan U." <[EMAIL PROTECTED]> wrote: > I think you could use a BitmapDrawable. There apparently is a > constructor that takes either a filename string or an InputStream. You > could probably use > either:http://code.google.com/android/reference/android/graphics/drawable/Bi...) > > On Apr 13, 11:14 am, Pzikit Bloo <[EMAIL PROTECTED]> wrote: > > > Hi all, > > I'm trying to set an ImageView depending on an input, like a db field, > > so if that is x, image to display will be x.png, and so on.. > > > But how to do this without use R.drawable syntax? > > > Thanks, > > Pzikit Bloo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

