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.

asked Mar 16, 2011 at 9:07
2
  • Please tell what's your problem. You cant't find a proper control's method or can't transform file name to name of field in R file? Commented Mar 16, 2011 at 9:11
  • I want to get a resource(image) in the drawable folder from a filename(string) Commented Mar 16, 2011 at 9:28

1 Answer 1

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.

answered Mar 16, 2011 at 9:36
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.