android.view.animation.AlphaAnimation
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
Summary
| |
|
|
Value |
|
| int |
ABSOLUTE |
The specified dimension is an absolute number of pixels. |
0 |
0x00000000 |
| int |
NO_REPEAT |
Don't do anything when the animation ends. |
0 |
0x00000000 |
| int |
RELATIVE_TO_PARENT |
The specified dimension holds a float and should be multiplied by the
height or width of the parent of the object being animated. |
2 |
0x00000002 |
| int |
RELATIVE_TO_SELF |
The specified dimension holds a float and should be multiplied by the
height or width of the object being animated. |
1 |
0x00000001 |
| int |
REPEAT |
Replay the animation from the beginning. |
1 |
0x00000001 |
| int |
REVERSE |
Replay the animation backwards (then forwards again). |
2 |
0x00000002 |
mCycleFlip,
mDurationMillis,
mEnded,
mFillAfter,
mFillBefore,
mInitialized,
mInterpolator,
mListener,
mRepeatMode,
mStartOffsetMillis,
mStartTimeMillis,
mStarted
Public Constructors
Public Methods
Protected Methods
applyTransformation,
ensureInterpolator,
getDuration,
getFillAfter,
getFillBefore,
getInterpolator,
getRepeatMode,
getStartOffset,
getStartTime,
getTransformation,
initialize,
isEnded,
isInitialized,
isStarted,
reset,
resolveSize,
scaleCurrentDuration,
setAnimationListener,
setDuration,
setFillAfter,
setFillBefore,
setInterpolator,
setInterpolator,
setRepeatMode,
setStartOffset,
setStartTime,
start,
startNow,
willChangeTargetViewBounds,
willChangeTransformationMatrix
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Constructors
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
|
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.
|
Public Methods
public
boolean
willChangeTargetViewBounds()
Indicates whether or not this animation will affect the current
bounds of the target view. For instance, a fade animation will not
affect the bounds whereas a scale animation will.
public
boolean
willChangeTransformationMatrix()
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.
Protected Methods
protected
void
applyTransformation(float interpolatedTime, Transformation t)
Changes the alpha property of the supplied
Transformation
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.
|