Shrink To Middle Activity Transition In Android

I forgot which forum I found this XML code for creating an animation of Activity transition shrinking from all sides to the middle. You know, like the effect in iPhone. The problem was, the result did not work.

For the Activity that is assigned this transition, you would want the new Activity to still appear and have the old one shrink to middle. It took me quite a bit to figure this out.

For this effect to properly work, you need to add the attribute android:zAdjustment=”top” to ensure that the old Activity will be displayed to front, shrinking to the middle while the new Activity stays idle in the background.

Here is the XML code.

Donations appreciated. Every little $ helps. Or click Google +1.

Android: Left To Right, Right To Left Activity Transition In XML

Donations appreciated. Every little $ helps. Or click Google +1.

Grow From Middle XML Activity Transition In Android

Here is what I have come up with an XML file for an animation transition of an activity that expands from the center most to all sides.

You may want to change the android:duration attribute value during your testing so you can see the animation clearly.

Donations appreciated. Every little $ helps. Or click Google +1.

Related Posts Plugin for WordPress, Blogger...