# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Inherited XML Attrs | Inherited Constants | Ctors | Methods | Protected Methods | Inherited Methods

# RotateAnimation

`public class RotateAnimation`
`` `extends Animation` ``

java.lang.Object
↳ | android.view.animation.Animation
| ↳ | android.view.animation.RotateAnimation

An animation that controls the rotation of an object. This rotation takes place in 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.

## Summary

### Inherited XML attributes
From class `android.view.animation.Animation`
`android:detachWallpaper` | Special option for window animations: if this window is on top of a wallpaper, don't animate the wallpaper with it.
`android:duration` | Amount of time (in milliseconds) for the animation to run.
`android:fillAfter` | When set to true, the animation transformation is applied after the animation is over.
`android:fillBefore` | When set to true or when fillEnabled is not set to true, the animation transformation is applied before the animation has started.
`android:fillEnabled` | When set to true, the value of fillBefore is taken into account.
`android:interpolator` | Defines the interpolator used to smooth the animation movement in time.
`android:repeatCount` | Defines how many times the animation should repeat.
`android:repeatMode` | Defines the animation behavior when it reaches the end and the repeat count is greater than 0 or infinite.
`android:startOffset` | Delay in milliseconds before the animation runs, once start time is reached.
`android:zAdjustment` | Allows for an adjustment of the Z ordering of the content being animated for the duration of the animation.

### Inherited constants
From class `android.view.animation.Animation`
`int` | `ABSOLUTE` The specified dimension is an absolute number of pixels.
`int` | `INFINITE` Repeat the animation indefinitely.
`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.
`int` | `RELATIVE_TO_SELF` The specified dimension holds a float and should be multiplied by the height or width of the object being animated.
`int` | `RESTART` When the animation reaches the end and the repeat count is INFINTE_REPEAT or a positive value, the animation restarts from the beginning.
`int` | `REVERSE` When the animation reaches the end and the repeat count is INFINTE_REPEAT or a positive value, the animation plays backward (and then forward again).
`int` | `START_ON_FIRST_FRAME` Can be used as the start time to indicate the start time should be the current time when `getTransformation(long, android.view.animation.Transformation)` is invoked for the first animation frame.
`int` | `ZORDER_BOTTOM` Requests that the content being animated be forced under all other content for the duration of the animation.
`int` | `ZORDER_NORMAL` Requests that the content being animated be kept in its current Z order.
`int` | `ZORDER_TOP` Requests that the content being animated be forced on top of all other content for the duration of the animation.

### Public constructors
`RotateAnimation(Context context, AttributeSet attrs)` Constructor used when a 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

### Public methods
`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.

### Protected methods
`void` | `applyTransformation(float interpolatedTime, Transformation t)` Helper for getTransformation.

### Inherited methods
From class `android.view.animation.Animation`
`void` | `applyTransformation(float interpolatedTime, Transformation t)` Helper for getTransformation.
`void` | `cancel()` Cancel the animation.
`Animation` | `clone()` Creates and returns a copy of this object.
`long` | `computeDurationHint()` Compute a hint at how long the entire animation may last, in milliseconds.
`void` | `ensureInterpolator()` Gurantees that this animation has an interpolator.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`int` | `getBackgroundColor()` This method is deprecated. None of window animations are running with background color.
`boolean` | `getDetachWallpaper()` This method is deprecated. All window animations are running with detached wallpaper.
`long` | `getDuration()` How long this animation should last
`boolean` | `getFillAfter()` If fillAfter is true, this animation will apply its transformation after the end time of the animation.
`boolean` | `getFillBefore()` If fillBefore is true, this animation will apply its transformation before the start time of the animation.
`Interpolator` | `getInterpolator()` Gets the acceleration curve type for this animation.
`int` | `getRepeatCount()` Defines how many times the animation should repeat.
`int` | `getRepeatMode()` Defines what this animation should do when it reaches the end.
`float` | `getScaleFactor()` The scale factor is set by the call to `getTransformation`.
`long` | `getStartOffset()` When this animation should start, relative to StartTime
`long` | `getStartTime()` When this animation should start.
`boolean` | `getTransformation(long currentTime, Transformation outTransformation, float scale)` Gets the transformation to apply at a specified point in time.
`boolean` | `getTransformation(long currentTime, Transformation outTransformation)` Gets the transformation to apply at a specified point in time.
`int` | `getZAdjustment()` Returns the Z ordering mode to use while running the animation as previously set by `setZAdjustment(int)`.
`boolean` | `hasEnded()` Indicates whether this animation has ended or not.
`boolean` | `hasStarted()` Indicates whether this animation has started or not.
`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.
`boolean` | `isFillEnabled()` If fillEnabled is true, this animation will apply the value of fillBefore.
`boolean` | `isInitialized()` Whether or not the animation has been initialized.
`void` | `reset()` Reset the initialization state of this animation.
`float` | `resolveSize(int type, float value, int size, int parentSize)` Convert the information in the description of a size to an actual dimension
`void` | `restrictDuration(long durationMillis)` Ensure that the duration that this animation will run is not longer than durationMillis.
`void` | `scaleCurrentDuration(float scale)` How much to scale the duration by.
`void` | `setAnimationListener(Animation.AnimationListener listener)` Binds an animation listener to this animation.
`void` | `setBackgroundColor(int bg)` This method is deprecated. None of window animations are running with background color.
`void` | `setDetachWallpaper(boolean detachWallpaper)` This method is deprecated. All window animations are running with detached wallpaper.
`void` | `setDuration(long durationMillis)` How long this animation should last.
`void` | `setFillAfter(boolean fillAfter)` If fillAfter is true, the transformation that this animation performed will persist when it is finished.
`void` | `setFillBefore(boolean fillBefore)` If fillBefore is true, this animation will apply its transformation before the start time of the animation.
`void` | `setFillEnabled(boolean fillEnabled)` If fillEnabled is true, the animation will apply the value of fillBefore.
`void` | `setInterpolator(Context context, int resID)` Sets the acceleration curve for this animation.
`void` | `setInterpolator(Interpolator i)` Sets the acceleration curve for this animation.
`void` | `setRepeatCount(int repeatCount)` Sets how many times the animation should be repeated.
`void` | `setRepeatMode(int repeatMode)` Defines what this animation should do when it reaches the end.
`void` | `setStartOffset(long startOffset)` When this animation should start relative to the start time.
`void` | `setStartTime(long startTimeMillis)` When this animation should start.
`void` | `setZAdjustment(int zAdjustment)` Set the Z ordering mode to use while running the animation.
`void` | `start()` Convenience method to start the animation the first time `getTransformation(long, android.view.animation.Transformation)` is invoked.
`void` | `startNow()` Convenience method to start the animation at the current time in milliseconds.
`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.
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Public constructors

### RotateAnimation

    public RotateAnimation (Context context,
                    AttributeSet attrs)

Constructor used when a RotateAnimation is loaded from a resource.

Parameters
`context` | `Context`: Application context to use
`attrs` | `AttributeSet`: Attribute set from which to read values

### RotateAnimation

    public RotateAnimation (float fromDegrees,
                    float toDegrees)

Constructor to use when building a RotateAnimation from code. Default pivotX/pivotY point is (0,0).

Parameters
`fromDegrees` | `float`: Rotation offset to apply at the start of the animation.
`toDegrees` | `float`: Rotation offset to apply at the end of the animation.

### RotateAnimation

    public RotateAnimation (float fromDegrees,
                    float toDegrees,
                    float pivotX,
                    float pivotY)

Constructor to use when building a RotateAnimation from code

Parameters
`fromDegrees` | `float`: Rotation offset to apply at the start of the animation.
`toDegrees` | `float`: Rotation offset to apply at the end of the animation.
`pivotX` | `float`: 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` | `float`: The Y coordinate of the point about which the object is being rotated, specified as an absolute number where 0 is the top edge.

### RotateAnimation

    public RotateAnimation (float fromDegrees,
                    float toDegrees,
                    int pivotXType,
                    float pivotXValue,
                    int pivotYType,
                    float pivotYValue)

Constructor to use when building a RotateAnimation from code

Parameters
`fromDegrees` | `float`: Rotation offset to apply at the start of the animation.
`toDegrees` | `float`: Rotation offset to apply at the end of the animation.
`pivotXType` | `int`: Specifies how pivotXValue should be interpreted. One of Animation.ABSOLUTE, Animation.RELATIVE_TO_SELF, or Animation.RELATIVE_TO_PARENT.
`pivotXValue` | `float`: 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` | `int`: Specifies how pivotYValue should be interpreted. One of Animation.ABSOLUTE, Animation.RELATIVE_TO_SELF, or Animation.RELATIVE_TO_PARENT.
`pivotYValue` | `float`: 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.

## Public methods

### initialize

    public 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. (This is to support animation sizes being specified relative to these dimensions.)

Objects that interpret Animations should call this method when the sizes of the object being animated and its parent are known, and before calling `getTransformation(long, Transformation)`.

Parameters
`width` | `int`: Width of the object being animated
`height` | `int`: Height of the object being animated
`parentWidth` | `int`: Width of the animated object's parent
`parentHeight` | `int`: Height of the animated object's parent

## Protected methods

### applyTransformation

    protected void applyTransformation (float interpolatedTime,
                    Transformation t)

Helper for getTransformation. Subclasses should implement this to apply their transforms given an interpolation value. Implementations of this method should always replace the specified Transformation or document they are doing otherwise.

Parameters
`interpolatedTime` | `float`: The value of the normalized time (0.0 to 1.0) after it has been run through the interpolation function.
`t` | `Transformation`: The Transformation object to fill in with the current transforms.

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*