public class AlphaAnimation extends Animation
Transformation
Animation.AnimationListener, Animation.Description
ABSOLUTE, INFINITE, RELATIVE_TO_PARENT, RELATIVE_TO_SELF, RESTART, REVERSE, START_ON_FIRST_FRAME, ZORDER_BOTTOM, ZORDER_NORMAL, ZORDER_TOP
Constructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
protected void |
applyTransformation(float interpolatedTime,
Transformation t)
Changes the alpha property of the supplied
Transformation |
boolean |
hasAlpha()
Return true if this animation changes the view's alpha property.
|
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.
|
cancel, clone, computeDurationHint, detach, ensureInterpolator, finalize, getBackgroundColor, getDetachWallpaper, getDuration, getFillAfter, getFillBefore, getInterpolator, getInvalidateRegion, getRepeatCount, getRepeatMode, getScaleFactor, getStartOffset, getStartTime, getTransformation, getTransformation, getZAdjustment, hasEnded, hasStarted, initialize, initializeInvalidateRegion, isFillEnabled, isInitialized, reset, resolveSize, restrictDuration, scaleCurrentDuration, setAnimationListener, setBackgroundColor, setDetachWallpaper, setDuration, setFillAfter, setFillBefore, setFillEnabled, setInterpolator, setInterpolator, setListenerHandler, setRepeatCount, setRepeatMode, setStartOffset, setStartTime, setZAdjustment, start, startNow
public AlphaAnimation(Context context, AttributeSet attrs)
context
- Application context to useattrs
- Attribute set from which to read valuespublic AlphaAnimation(float fromAlpha, float toAlpha)
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.protected void applyTransformation(float interpolatedTime, Transformation t)
Transformation
applyTransformation
in class Animation
interpolatedTime
- The value of the normalized time (0.0 to 1.0)
after it has been run through the interpolation function.t
- The Transformation object to fill in with the current
transforms.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.
willChangeTransformationMatrix
in class Animation
public boolean willChangeBounds()
Animation
Indicates whether or not this animation will affect the bounds of the animated view. For instance, a fade animation will not affect the bounds whereas a 200% scale animation will.
willChangeBounds
in class Animation