You can retrieve the resource id of any resource using
getIdentifier();
For example:
Resources x = this.getResources();
int resid = x.getIdentifier("x", "drawable", "your.package.name");
your_image.setImageResource(resid);
On Apr 13, 8:14 pm, 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
-~----------~----~----~----~------~----~------~--~---