I have 110 images, all labeled 1, 2, 3, etc. I would like for me to be able to customize it so that I can create a random number and then display this image on the screen. Part of the display is beautiful, but I'm not sure about the array.
So far, all I've seen are arrays that require manual configuration — entering each name in XML. For 10 or 15 images, this is not bad. For 110 or thousands (in the future, I hope), this is pretty inefficient. Is there a way to show an image based on its name and not the resource identifier? Ideally, I would like to be able to call my images "ENG_1" and "SPA_1" to display different images for different languages, so it would be nice to have it based on a string, not int, for searching (if it's a word) and ease access.
So how do I get started?
source
share