Android: Touch to Change Image

Credit: Wikimedia
Credit: Wikimedia

On iOS I do this using a button (with different pressed state), and I figured it would be the same on Android, but turns out, no.

Step 1: Add a second image to the XML, and set the visibility to “gone”.

Step 2: Add a tap target that changes visibility.

Step 3: There is no step 3. Done!

Leave a Reply