I am trying to use an array of images then set my ImageView to one of the images in the array. My first instinct was to use an array of strings with the image names but this did
You can use the resources from drawable-mdpi and store them in an array of integers like
private static final Integer[] Icons = {
R.drawable.bg_android_icon,
R.drawable.bg_sunrise_icon,
R.drawable.bg_sunset_icon,
......
};
And then you can use it in a loop with Postion ranging from 0 to Icons.length and set it to ImageView
ImageView.setBackground=getResources().getDrawable(Icons[Position]);