|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.view.animation.Animation
android.view.animation.RotateAnimation
public class RotateAnimation
An animation that controls the rotation of an object. This rotation takes place int the X-Y plane. You can specify the point to use for the center of the rotation, where (0,0) is the top left point. If not specified, (0,0) is the default rotation point.
| 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 | |
|---|---|
RotateAnimation(Context context,
AttributeSet attrs)
Constructor used whan an RotateAnimation is loaded from a resource. |
|
RotateAnimation(float fromDegrees,
float toDegrees)
Constructor to use when building a RotateAnimation from code. |
|
RotateAnimation(float fromDegrees,
float toDegrees,
float pivotX,
float pivotY)
Constructor to use when building a RotateAnimation from code |
|
RotateAnimation(float fromDegrees,
float toDegrees,
int pivotXType,
float pivotXValue,
int pivotYType,
float pivotYValue)
Constructor to use when building a RotateAnimation from code |
|
| Method Summary | |
|---|---|
protected void |
applyTransformation(float interpolatedTime,
Transformation t)
Helper for getTransformation. |
void |
initialize(int width,
int height,
int parentWidth,
int parentHeight)
Initialize this animation with the dimensions of the object being animated as well as the objects parents. |
| Methods inherited from class android.view.animation.Animation |
|---|
ensureInterpolator, getDuration, getFillAfter, getFillBefore, getInterpolator, getRepeatCount, getRepeatMode, getStartOffset, getStartTime, getTransformation, getZAdjustment, hasEnded, hasStarted, isInitialized, reset, resolveSize, restrictDuration, scaleCurrentDuration, setAnimationListener, setDuration, setFillAfter, setFillBefore, setInterpolator, setInterpolator, setRepeatCount, setRepeatMode, setStartOffset, setStartTime, setZAdjustment, start, startNow, willChangeBounds, willChangeTransformationMatrix |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RotateAnimation(Context context,
AttributeSet attrs)
context - Application context to useattrs - Attribute set from which to read values
public RotateAnimation(float fromDegrees,
float toDegrees)
fromDegrees - Rotation offset to apply at the start of the
animation.toDegrees - Rotation offset to apply at the end of the animation.
public RotateAnimation(float fromDegrees,
float toDegrees,
float pivotX,
float pivotY)
fromDegrees - Rotation offset to apply at the start of the
animation.toDegrees - Rotation offset to apply at the end of the animation.pivotX - The X coordinate of the point about which the object is
being rotated, specified as an absolute number where 0 is the left
edge.pivotY - The Y coordinate of the point about which the object is
being rotated, specified as an absolute number where 0 is the top
edge.
public RotateAnimation(float fromDegrees,
float toDegrees,
int pivotXType,
float pivotXValue,
int pivotYType,
float pivotYValue)
fromDegrees - Rotation offset to apply at the start of the
animation.toDegrees - Rotation offset to apply at the end of the animation.pivotXType - Specifies how pivotXValue should be interpreted. One of
Animation.ABSOLUTE, Animation.RELATIVE_TO_SELF, or
Animation.RELATIVE_TO_PARENT.pivotXValue - The X coordinate of the point about which the object
is being rotated, specified as an absolute number where 0 is the
left edge. This value can either be an absolute number if
pivotXType is ABSOLUTE, or a percentage (where 1.0 is 100%)
otherwise.pivotYType - Specifies how pivotYValue should be interpreted. One of
Animation.ABSOLUTE, Animation.RELATIVE_TO_SELF, or
Animation.RELATIVE_TO_PARENT.pivotYValue - The Y coordinate of the point about which the object
is being rotated, specified as an absolute number where 0 is the
top edge. This value can either be an absolute number if
pivotYType is ABSOLUTE, or a percentage (where 1.0 is 100%)
otherwise.| Method Detail |
|---|
protected void applyTransformation(float interpolatedTime,
Transformation t)
Animation
applyTransformation in class AnimationinterpolatedTime - 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.
public void initialize(int width,
int height,
int parentWidth,
int parentHeight)
AnimationObjects that interpret a Animations should call this method when
the sizes of the object being animated and its parent are known, and
before calling Animation.getTransformation(long, android.view.animation.Transformation).
initialize in class Animationwidth - Width of the object being animatedheight - Height of the object being animatedparentWidth - Width of the animated object's parentparentHeight - Height of the animated object's parent
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||