Build 1.0_r1(from source)

android.view.animation
Class AlphaAnimation

java.lang.Object
  extended by android.view.animation.Animation
      extended by android.view.animation.AlphaAnimation

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


Nested Class Summary
 
Nested classes/interfaces inherited from class android.view.animation.Animation
Animation.AnimationListener, Animation.Description
 
Field Summary
 
Fields inherited from class android.view.animation.Animation
ABSOLUTE, INFINITE, mCycleFlip, mDuration, mEnded, mFillAfter, mFillBefore, mInitialized, mInterpolator, mListener, mRepeatCount, mRepeated, mRepeatMode, mStarted, mStartOffset, mStartTime, RELATIVE_TO_PARENT, RELATIVE_TO_SELF, RESTART, REVERSE, START_ON_FIRST_FRAME, ZORDER_BOTTOM, ZORDER_NORMAL, ZORDER_TOP
 
Constructor Summary
AlphaAnimation(Context context, AttributeSet attrs)
          Constructor used whan an AlphaAnimation is loaded from a resource.
AlphaAnimation(float fromAlpha, float toAlpha)
          Constructor to use when building an AlphaAnimation from code
 
Method Summary
protected  void applyTransformation(float interpolatedTime, Transformation t)
          Changes the alpha property of the supplied Transformation
 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.
 
Methods inherited from class android.view.animation.Animation
ensureInterpolator, getDuration, getFillAfter, getFillBefore, getInterpolator, getRepeatCount, getRepeatMode, getStartOffset, getStartTime, getTransformation, getZAdjustment, hasEnded, hasStarted, initialize, isInitialized, reset, resolveSize, restrictDuration, scaleCurrentDuration, setAnimationListener, setDuration, setFillAfter, setFillBefore, setInterpolator, setInterpolator, setRepeatCount, setRepeatMode, setStartOffset, setStartTime, setZAdjustment, start, startNow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlphaAnimation

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

Parameters:
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

Parameters:
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.
Method Detail

applyTransformation

protected void applyTransformation(float interpolatedTime,
                                   Transformation t)
Changes the alpha property of the supplied Transformation

Overrides:
applyTransformation in class Animation
Parameters:
interpolatedTime - The value of the normalized time (0.0 to 1.0) after it has been run through the interpolation function.
t - The Transofrmation object to fill in with the current transforms.

willChangeTransformationMatrix

public boolean willChangeTransformationMatrix()
Description copied from class: 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.

Overrides:
willChangeTransformationMatrix in class Animation
Returns:
true if this animation will change the transformation matrix

willChangeBounds

public boolean willChangeBounds()
Description copied from class: 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.

Overrides:
willChangeBounds in class Animation
Returns:
true if this animation will change the view's bounds

Build 1.0_r1(from source)

Please submit a feedback, bug or feature