Familiar with the process of Animation in Android 3-scale the size of the Animation

Source: Internet
Author: User

Scale the animation effect

XML definition

1 <? Xml version = "1.0" encoding = "UTF-8"?>
2 <set xmlns: android = "http://schemas.android.com/apk/res/android">
3 <scale
4 android: interpolator =
5 "@ android: anim/accelerate_decelerate_interpolator"
6 android: fromXScale = "0.0"
7 android: toXScale = "1.4"
8 android: fromYScale = "0.0"
9 android: toYScale = "1.4"
10 android: Export Tx = "50%"
11 android: Ty = "50%"
12 android: fillAfter = "false"
13 android: duration = "700"/>
14 </set>

 

Android: interpolator specifies an animation plug-in.

There are three types of animation inserts:

  1. Accelerate_decelerate_interpolator acceleration-Deceleration animation inserter
  2. Accelerate_interpolator acceleration-animation insertor
  3. Decelerate_interpolator deceleration-animation insertor

Android: fromXScale attribute is the scaling size on the X coordinate when the animation starts
The toXScale attribute is the scaling size on the X coordinate when the animation ends.

The fromYScale attribute is the scaling size on the Y coordinate at the start of the animation.
The toYScale attribute is the scaling size on the Y coordinate when the animation ends.

Note:
The preceding four property values

0.0 indicates shrinking to none
1.0 indicates normal scaling-free
A value smaller than 1.0 indicates contraction.
Value greater than 1.0 indicates Amplification

The ready TX attribute is the starting position of the animation relative to the X coordinate of the object.
The ready ty attribute is the starting position of the animation relative to the Y coordinate of the object.

Note:
The preceding two attribute values are from 0% to 100%.
50% indicates the point position on the X or Y coordinate of the object.

Long integer value:
The duration attribute is the animation duration.
Description: The time is in milliseconds.

Boolean value:
FillAfter attribute whenSetTrue. The animation is convertedApplication

 

 

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.