I wish you could enlighten me in one situation. I want to change the image of an ImageView. I can even do it through:
final ImageView imageView = (ImageView) findViewById(R.id.imageChm);
imageView.setImageResource(R.drawable.img1);
However, I have some more images (img1, img2, img3, img4 ... img 50)
I would like them to use the same space, so I decide to adapt all the imageView only, in my case the imageChm, each image would be indicated by a button. Ex: when clicking the button1 the image that would appear would be img1, when clicking the button2 the image will be img2 and so on.
How can I change the address of the image (R.drawable.img1) de forma dinamica ao clicar nos botões respectivos.
REMEMBER THAT IN MY CASE THE BUTTON AND IMAGEVIEW ARE IN ACTIVITY DIFFERENT