Familiar with the process of Animation in Android 1-General Introduction

Source: Internet
Author: User

Summary of the recent use of animations based on online materials and your own understanding

There are four types of animations in Android: gradient transparency Animation effect, gradient scaling Animation effect, screen conversion position movement Animation effect, and screen transfer rotation Animation effect.

How to define an animation in an XML file
① Open Eclipse and create an Android Project
② Create an anim folder in the res directory
③ Create a new myanim. xml file in the anim directory (note that the file name is in lower case)
④ Add XML animation code
<? Xml version = "1.0" encoding = "UTF-8"?>
<Set xmlns: android = "http://schemas.android.com/apk/res/android">
<Alpha/> <! -- Gradient transparency animation effect -->
<Scale/> <! -- Gradient scaling animation effect -->
<Translate/> <! -- Animation effect for moving the image conversion position -->
<Rotate/> <! -- Animation effects of screen transfer and rotation -->
</Set>

In Java code

AlphaAnimation gradient transparency animation effect
ScaleAnimation gradient scaling animation effect
TranslateAnimation
RotateAnimation image transfer rotation animation effect

The two most common methods are as follows:

Tween Animation (gradient Animation): animated effects are generated by constantly performing image transformations (translation, scaling, and rotation) on objects in the scenario.

Frame Animation (Frame Animation): Play the prepared images in sequence, similar to playing a movie.

Going on ......

Reference: http://liaobingyun.blog.163.com/blog/static/12981211120099975217653? Fromdm & fromSearch & isFromSearchEngine = yes

Http://ybxu-123.blog.163.com/blog/static/5947377020106632910792/

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.