I am trying to zoom an image in and out using android's example below: http://developer.android.com/training/animation/zoom.html
This example works when the original image's container is a square, however not when the image is a rectangle. When the image is already zoomed in and I try to zoom it back out, the image will only zoom out until its height is equal to the original height; it doesn't keep going until its width is equal to the original width. The animation then thinks it's done, making the image appear to "snap" back to its original size rather than smoothly finishing zooming out.
So, how do I make the view keep zooming out until BOTH its width and height are equal to the original?