I have two images in my drawable folder, one called “Red” and the other called “Yellow”. I am trying to set these images equal to two variables, one currently called “redchip” and the other called “yellowchip”. Both redchip and yellowchip are declared as integers.
Can I set the R.drawable image integer values equal to my variables, and if so, how?
What I have done in the past is use a map in a util class to return the drawable’s integer id.
Example: