I have an imageView and a Button and trying to change different images in an image view by the click of a button. I know how to set an image in an image view that is by
img.setBackground(getBackgroundResource(R.drawable.image1);
but in my specific case i have 4 images and i want them to switch when the button is pressed. How can i do it?