动画类的全部方法..

Public Methods

void

cancel() 取消动画

Cancel the animation. 

long

computeDurationHint() 

Compute a hint at how long the entire animation may last, in milliseconds.

int

getBackgroundColor() 

Returns the background color behind the animation.

boolean

getDetachWallpaper() 

Return value of setDetachWallpaper(boolean).

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.

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.

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)  设置背景色

Set background behind animation.

void

setDetachWallpaper(boolean detachWallpaper) 

If detachWallpaper is true, and this is a window animation of a window that has a wallpaper background, then the window will be detached from the wallpaper while it runs.

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

 

原文地址:https://www.cnblogs.com/olvo/p/2471846.html