Possible Duplicate:
Setting Android images from string value
I need to change background image programmatically on Android with source string I have.
For example I have an array of strings gotten from XML file "source1", "source2" etc., so how can I set them to background as images?
I saw examples like mTextView.setBackgroundResource(R.drawable.myResouce);
, but I don't understand how to set mySource from a String. May be it is possible through drawable object?