android - How to change the image of imagebutton on every Click? -


I'm making a puzzle word match game in Android, clicking on my requirement is to change the image button's image, and then If the image button is clicked again, then I want to display the previous image. It should be done on every click, can someone help me?

You can either use the variable to keep the track of the button click or the button of the object Store the specified image id as currently, then just check the value in theClickListener and change it accordingly.


Comments