Q:

How to call Resource_name with a String variable?

I would like to replace the default ImageView with a random drawable file. I'm trying to use a string that will call a resource_name in java with a  variable string that changes based on the user's input. 
JAVA code
String random1 = userinput_1;
String random2 = userinput_2;
String replaceImageView = (random1+"_"+random2);
orignalImageView.setImageResource(R.drawable.replaceImageView);

A:

You need to get the identifier using the name, then use it as you would normally
String random1 = userinput_1;
String random2 = userinput_2;
String replaceImageView = (random1+"_"+random2);
int drawableResourceId = this.getResources().getIdentifier(replaceImageView, "drawable", this.getPackageName());
orignalImageView.setImageResource(drawableResourceId);

