The App->activity->animation sample is used to demonstrate the dynamic effects of different activity transitions. The example defines two kinds of animation effects, the gradient fade in, the new occurrence of the activity gradually show, amplification effect zoom, new activity from small and large gradually show.
Animation resources in Android can be divided into two categories:
Tween Animation perform various transformations (scaling, panning, rotation, etc.) on a single image to achieve animation.
Frame Animation display animation from a set of image sequences.
The tween Animation is used in the Animation, and the resources used are R.anim.fade, R.anim.hold,r.anim.zoom_enter, R.anim.zoom_exit.
Among them R.anim.fade, R.anim.zoom_enter are fade in and zoom animation resources respectively. It is defined as
Fade.xml
<alpha xmlns:android= "http://schemas.android.com/apk/res/android"
android:interpolator= "@android: anim/ Accelerate_interpolator "
android:fromalpha=" 0.0″android:toalpha= "1.0″
android:duration=" @android: Integer/config_longanimtime "/>
Zoom_center.xml
<set xmlns:android= "http://schemas.android.com/apk/res/android"
android:interpolator= "@android: anim/ Decelerate_interpolator ">
<scale android:fromxscale=" 2.0″android:toxscale= "1.0″
android: fromyscale= "2.0″android:toyscale=" "1.0″ android:pivotx=" 50%p "android:pivoty=" 50%p "android:duration="
@ Android:integer/config_mediumanimtime "/>
</set>