Check out example codes for "get drawable with string android java". It will help you in understanding the concepts better.

Code Example 1

Context context = imageView.getContext();
int id = context.getResources().getIdentifier("picture0001", "drawable", context.getPackageName());
imageView.setImageResource(id);

Learn ReactJs, React Native from akashmittal.com