-3

for example

     public static String[] dogs = {
                "White dog",
                "brown dog"
               }

is it possible to load up an image when "white dog" is called/used?

Ali
  • 3,346
  • 4
  • 21
  • 56

1 Answers1

0

If you want to load images in Android Studio in the fashion you want to, you need to do the following:

  1. Add the images to your project (inside the drawable folder)
  2. Put all the images inside the array (I.E. [R.drawable.image_1, R.drawable.image_2]
  3. Then you can access those elements based upon the logic you need
tomerpacific
  • 4,704
  • 13
  • 34
  • 52