Android动画系列之概述

来源:互联网 发布:js替换所有字符串 编辑:程序博客网 时间:2024/05/16 18:19

克服心理障碍来写这个系列,希望可以写好。这篇文章主要从整体上来看看Android动画的外貌,以后的几篇文章中会慢慢揭开Android动画神秘的面纱。

AnimationThe Android framework provides two animation systems: property animation and view animation. Both animation systems are viable options, but the property animation system, in general, is the preferred method to use, because it is more flexible and offers more features. In addition to these two systems, you can utilize Drawable animation, which allows you to load drawable resources and display them one frame after another.

这是Android官方的介绍。
大概意思是Android框架本身提供了两种动画:属性动画和View动画。这两个动画都可以使用,但是推荐使用属性动画,因为它更加灵活而且提供了更多的功能。除了这两种动画,你也可以采用Drawable动画,Drawable动画是一种加载一系列的drawable资源然后逐帧地显示出来的动画。

Android中动画分为两大类:

View Animation

View Animation is the older system and can only be used for Views. It is relatively easy to setup and offers enough capabilities to meet many application's needs.

View Animation是一个只用于View的比较老的动画系统,它相对来说比较容易使用而且提供了很多应用需要的丰富的功能。

View Animation又包含两类动画,一个是Tween动画(补间动画),另一个是Drawable动画(Frame动画或者帧动画)

  • Tween Animation(补间动画)

  • Frame Animation(逐帧动画)

Property Animation(属性动画)

Introduced in Android 3.0 (API level 11), the property animation system lets you animate properties of any object, including ones that are not rendered to the screen. The system is extensible and lets you animate properties of custom types as well.

Property Animation在Android 3.0 (API level 11)以上可用,可以设置给任何Object,包括那些还没有渲染到屏幕上的对象。这种动画是可扩展的,可以让你自定义任何类型和属性的动画。

下篇文章我们将仔细介绍View动画。
Android动画系列之——View动画

2 0