0

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.

user626912
  • 2,546
  • 3
  • 24
  • 33

1 Answers1

1

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.

Community
  • 1
  • 1
Alexander Oleynikov
  • 19,190
  • 11
  • 37
  • 51