Most visited

Recently visited

Added in API level 1

AlphaAnimation

public class AlphaAnimation
extends Animation

java.lang.Object
   ↳ android.view.animation.Animation
     ↳ android.view.animation.AlphaAnimation


控制对象的Alpha级别的动画。 用于淡入淡出的东西。 该动画最终改变了Transformation的alpha属性

Summary

Inherited XML attributes

From class android.view.animation.Animation

Inherited constants

From class android.view.animation.Animation

Public constructors

AlphaAnimation(Context context, AttributeSet attrs)

从资源加载AlphaAnimation时使用的构造函数。

AlphaAnimation(float fromAlpha, float toAlpha)

从代码构建AlphaAnimation时使用的构造函数

Public methods

boolean willChangeBounds()

指示此动画是否会影响动画视图的边界。

boolean willChangeTransformationMatrix()

指示此动画是否会影响转换矩阵。

Protected methods

void applyTransformation(float interpolatedTime, Transformation t)

更改提供的 Transformation的alpha属性

Inherited methods

From class android.view.animation.Animation
From class java.lang.Object

Public constructors

AlphaAnimation

Added in API level 1
AlphaAnimation (Context context, 
                AttributeSet attrs)

从资源加载AlphaAnimation时使用的构造函数。

Parameters
context Context: Application context to use
attrs AttributeSet: Attribute set from which to read values

AlphaAnimation

Added in API level 1
AlphaAnimation (float fromAlpha, 
                float toAlpha)

从代码构建AlphaAnimation时使用的构造函数

Parameters
fromAlpha float: Starting alpha value for the animation, where 1.0 means fully opaque and 0.0 means fully transparent.
toAlpha float: Ending alpha value for the animation.

Public methods

willChangeBounds

Added in API level 1
boolean willChangeBounds ()

指示此动画是否会影响动画视图的边界。 例如,淡入淡出的动画不会影响界限,而200%的动画将会影响界限。

Returns
boolean true if this animation will change the view's bounds

willChangeTransformationMatrix

Added in API level 1
boolean willChangeTransformationMatrix ()

指示此动画是否会影响转换矩阵。 例如,淡入淡出的动画不会影响矩阵,而标度动画会影响矩阵。

Returns
boolean true if this animation will change the transformation matrix

Protected methods

applyTransformation

Added in API level 1
void applyTransformation (float interpolatedTime, 
                Transformation t)

更改提供的 Transformation的alpha属性

Parameters
interpolatedTime float: The value of the normalized time (0.0 to 1.0) after it has been run through the interpolation function.
t Transformation: The Transformation object to fill in with the current transforms.

Hooray!