AlphaAnimation
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 |
方法摘要 | |
---|---|
| 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