I recently tried to get some activity transistion animations going. You know, sliding in the newly launched activity, that kind of thing.
What I wanted was to have my old activity just sit there whilst my new activity (a scroll) opened up horizontally from the centre of the screen. So I wrote my scaling animation xml and buggered around using overridePendingTransition. And completely failed to get anything to show.
Turns out, even if you’re just animating the x-scale property (android:fromXscale=”0″ and android:toXScale=”1″ with the scaling centered on the screen at android:XPivot=”50%”), you NEED to supply the Y values in the xml, too! Just set them from “1” to “1” will do, but you do have to supply them.
After doing this, my animation works fine (even though it does look a little cheesy…I might have to work my 9patch a bit).