ScaleAnimation  |  API reference  |  Android Developers

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 getBackdropColor()

Returns the background color to show behind the animating windows.

int getBackgroundColor()

This method was deprecated in API level 30. None of window animations are running with background color.

boolean getDetachWallpaper()

This method was deprecated in API level 29. 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.

boolean getShowBackdrop()

If showBackdrop is true and this animation is applied on a window, then the windows in the animation will animate with the background associated with this window behind them.

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 setBackdropColor(int backdropColor)

Set the color to use for the backdrop shown behind the animating windows.

void setBackgroundColor(int bg)

This method was deprecated in API level 30. None of window animations are running with background color.

void setDetachWallpaper(boolean detachWallpaper)

This method was deprecated in API level 29. 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(Interpolator i)

Sets the acceleration curve for this animation.

void setInterpolator(Context context, int resID)

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 setShowBackdrop(boolean showBackdrop)

If showBackdrop is true and this animation is applied on a window, then the windows in the animation will animate with the background associated with this window behind them.

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,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.