设为首页 | 收藏本站

AlphaAnimation(示例,出错代码)

出处:Android API 作者:Android API 阅读:1643次

android.view.animation
类 AlphaAnimation

java.lang.Object
  继承者 android.view.animation.Animation
      继承者 android.view.animation.AlphaAnimation
所有已实现的接口:
Cloneable

public class AlphaAnimation
extends Animation

An animation that controls the alpha level of an object. Useful for fading things in and out. This animation ends up changing the alpha property of a Transformation


嵌套类摘要
 
从类 android.view.animation.Animation 继承的嵌套类/接口
Animation.AnimationListener
 
字段摘要
 
从类 android.view.animation.Animation 继承的字段
ABSOLUTE, INFINITE, RELATIVE_TO_PARENT, RELATIVE_TO_SELF, RESTART, REVERSE, START_ON_FIRST_FRAME, ZORDER_BOTTOM, ZORDER_NORMAL, ZORDER_TOP
 
构造方法摘要
AlphaAnimation(Context context, AttributeSet attrs)
          Constructor used when an AlphaAnimation is loaded from a resource.
AlphaAnimation(float fromAlpha, float toAlpha)
          Constructor to use when building an AlphaAnimation from code
 
方法摘要
 boolean willChangeBounds()
          Indicates whether or not this animation will affect the bounds of the animated view.
 boolean willChangeTransformationMatrix()
          Indicates whether or not this animation will affect the transformation matrix.
 
从类 android.view.animation.Animation 继承的方法
computeDurationHint, getDuration, getFillAfter, getFillBefore, getInterpolator, getInvalidateRegion, getRepeatCount, getRepeatMode, getStartOffset, getStartTime, getTransformation, getZAdjustment, hasEnded, hasStarted, initialize, initializeInvalidateRegion, isFillEnabled, isInitialized, reset, restrictDuration, scaleCurrentDuration, setAnimationListener, setDuration, setFillAfter, setFillBefore, setFillEnabled, setInterpolator, setInterpolator, setRepeatCount, setRepeatMode, setStartOffset, setStartTime, setZAdjustment, start, startNow
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

AlphaAnimation

public AlphaAnimation(Context context,
                      AttributeSet attrs)
Constructor used when an AlphaAnimation is loaded from a resource.

参数:
context - Application context to use
attrs - Attribute set from which to read values

AlphaAnimation

public AlphaAnimation(float fromAlpha,
                      float toAlpha)
Constructor to use when building an AlphaAnimation from code

参数:
fromAlpha - Starting alpha value for the animation, where 1.0 means fully opaque and 0.0 means fully transparent.
toAlpha - Ending alpha value for the animation.
方法详细信息

willChangeTransformationMatrix

public boolean willChangeTransformationMatrix()
从类 Animation 复制的描述

Indicates whether or not this animation will affect the transformation matrix. For instance, a fade animation will not affect the matrix whereas a scale animation will.

覆盖:
Animation 中的 willChangeTransformationMatrix
返回:
true if this animation will change the transformation matrix

willChangeBounds

public boolean willChangeBounds()
从类 Animation 复制的描述

Indicates whether or not this animation will affect the bounds of theanimated view. For instance, a fade animation will not affect the boundswhereas a 200% scale animation will.

覆盖:
Animation 中的 willChangeBounds
返回:
true if this animation will change the view's bounds

上一篇:AccelerateInterpolator

下一篇:Animation

本文标签

AlphaAnimation