Android Apidemos Sample Resolution (3) App->activity->animation

Source: Internet
Author: User
Tags integer xmlns

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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.