user626912
user626912

Reputation: 2560

Changing image in imageview dynamically

I have a "detailed" view of some products and when the user taps one of the rows in the listview a detailed view of the product is showed. How do I change the image in the imageview when I have the name of the image file which is in the Drawable folder?

Thank you.

Upvotes: 0

Views: 890

Answers (1)

Alexander Oleynikov
Alexander Oleynikov

Reputation: 19368

Maybe using assets is more suitable solution for you? This topic was already discussed. Otherwise you can use reflection to find a needed field in R class.

Upvotes: 1

Related Questions