AnimationSet
来源:互联网 发布:优化党员素质 编辑:程序博客网 时间:2024/05/18 01:32
AnimationSet(示例,出错代码)
android.view.animation
类 AnimationSet
java.lang.Object android.view.animation.Animation android.view.animation.AnimationSet
- 所有已实现的接口:
- Cloneable
public class AnimationSet
- extends Animation
Represents a group of Animations that should be played together. The transformation of each individual animation are composed together into a single transform. If AnimationSet sets any properties that its children also set (for example, duration or fillBefore), the values of AnimationSet override the child values.
Animation.AnimationListener
ABSOLUTE, INFINITE, RELATIVE_TO_PARENT, RELATIVE_TO_SELF, RESTART, REVERSE, START_ON_FIRST_FRAME, ZORDER_BOTTOM, ZORDER_NORMAL, ZORDER_TOP
AnimationSet(boolean shareInterpolator)
Constructor to use when building an AnimationSet from code
AnimationSet(Context context, AttributeSet attrs)
Constructor used when an AnimationSet is loaded from a resource.
void
addAnimation(Animation a)
Add a child animation to this animation set.
long
computeDurationHint()
The duration hint of an animation set is the maximum of the duration hints of all of its component animations.
List<Animation>
getAnimations()
long
getDuration()
The duration of an AnimationSet is defined to be the duration of the longest child animation.
long
getStartTime()
When this animation should start.
boolean
getTransformation(long currentTime, Transformation t)
The transformation of an animation set is the concatenation of all of its component animations.
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.
void
initializeInvalidateRegion(int left, int top, int right, int bottom)
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
setDuration(long durationMillis)
Sets the duration of every child animation.
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
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)
Sets the start time of this animation and all child animations
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.
getFillAfter, getFillBefore, getInterpolator, getInvalidateRegion, getRepeatCount, getRepeatMode, getStartOffset, getZAdjustment, hasEnded, hasStarted, isFillEnabled, isInitialized, setAnimationListener, setFillEnabled, setInterpolator, setInterpolator, setRepeatCount, setZAdjustment, start, startNow
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
AnimationSet
public AnimationSet(Context context, AttributeSet attrs)
- Constructor used when an AnimationSet is loaded from a resource.
- 参数:
context
- Application context to useattrs
- Attribute set from which to read values
AnimationSet
public AnimationSet(boolean shareInterpolator)
- Constructor to use when building an AnimationSet from code
- 参数:
shareInterpolator
- Pass true if all of the animations in this set should use the interpolator assocciated with this AnimationSet. Pass false if each animation should use its own interpolator.
setFillAfter
public void setFillAfter(boolean fillAfter)
- 从类
Animation
复制的描述 - If fillAfter is true, the transformation that this animation performed will persist when it is finished. Defaults to false if not set. Note that this applies when using an AnimationSet to chain animations. The transformation is not applied before the AnimationSet itself starts.
- 覆盖:
- 类
Animation
中的setFillAfter
- 参数:
fillAfter
- true if the animation should apply its transformation after it ends- 另请参见:
- Animation.setFillEnabled(boolean)
setFillBefore
public void setFillBefore(boolean fillBefore)
- 从类
Animation
复制的描述 - If fillBefore is true, this animation will apply its transformation before the start time of the animation. Defaults to true if not set. Note that this applies when using an AnimationSet to chain animations. The transformation is not applied before the AnimationSet itself starts.
- 覆盖:
- 类
Animation
中的setFillBefore
- 参数:
fillBefore
- true if the animation should apply its transformation before it starts- 另请参见:
- Animation.setFillEnabled(boolean)
setRepeatMode
public void setRepeatMode(int repeatMode)
- 从类
Animation
复制的描述 - Defines what this animation should do when it reaches the end. This setting is applied only when the repeat count is either greater than 0 or Animation.INFINITE. Defaults to Animation.RESTART.
- 覆盖:
- 类
Animation
中的setRepeatMode
- 参数:
repeatMode
- Animation.RESTART or Animation.REVERSE
setStartOffset
public void setStartOffset(long startOffset)
- 从类
Animation
复制的描述 - When this animation should start relative to the start time. This is most useful when composing complex animations using an AnimationSet where some of the animations components start at different times.
- 覆盖:
- 类
Animation
中的setStartOffset
- 参数:
startOffset
- When this Animation should start, in milliseconds from the start time of the root AnimationSet.
setDuration
public void setDuration(long durationMillis)
Sets the duration of every child animation.
- 覆盖:
- 类
Animation
中的setDuration
- 参数:
durationMillis
- the duration of the animation, in milliseconds, for every child in this set
addAnimation
public void addAnimation(Animation a)
- Add a child animation to this animation set. The transforms of the child animations are applied in the order that they were added
- 参数:
a
- Animation to add.
setStartTime
public void setStartTime(long startTimeMillis)
- Sets the start time of this animation and all child animations
- 覆盖:
- 类
Animation
中的setStartTime
- 参数:
startTimeMillis
- the start time in milliseconds- 另请参见:
- Animation.setStartTime(long)
getStartTime
public long getStartTime()
- 从类
Animation
复制的描述 - When this animation should start. If the animation has not startet yet, this method might return Animation.START_ON_FIRST_FRAME.
- 覆盖:
- 类
Animation
中的getStartTime
- 返回:
- the time in milliseconds when the animation should start or Animation.START_ON_FIRST_FRAME
restrictDuration
public void restrictDuration(long durationMillis)
- 从类
Animation
复制的描述 - Ensure that the duration that this animation will run is not longer than durationMillis. In addition to adjusting the duration itself, this ensures that the repeat count also will not make it run longer than the given time.
- 覆盖:
- 类
Animation
中的restrictDuration
- 参数:
durationMillis
- The maximum duration the animation is allowed to run.
getDuration
public long getDuration()
- The duration of an AnimationSet is defined to be the duration of the longest child animation.
- 覆盖:
- 类
Animation
中的getDuration
- 返回:
- the duration in milliseconds of the animation
- 另请参见:
- Animation.getDuration()
computeDurationHint
public long computeDurationHint()
- The duration hint of an animation set is the maximum of the duration hints of all of its component animations.
- 覆盖:
- 类
Animation
中的computeDurationHint
- 另请参见:
- Animation.computeDurationHint()
initializeInvalidateRegion
public void initializeInvalidateRegion(int left, int top, int right, int bottom)
- 覆盖:
- 类
Animation
中的initializeInvalidateRegion
getTransformation
public boolean getTransformation(long currentTime, Transformation t)
- The transformation of an animation set is the concatenation of all of its component animations.
- 覆盖:
- 类
Animation
中的getTransformation
- 参数:
currentTime
- Where we are in the animation. This is wall clock time.t
- A tranformation object that is provided by the caller and will be filled in by the animation.- 返回:
- True if the animation is still running
- 另请参见:
- Animation.getTransformation(long, android.view.animation.Transformation)
scaleCurrentDuration
public void scaleCurrentDuration(float scale)
- 从类
Animation
复制的描述 - How much to scale the duration by.
- 覆盖:
- 类
Animation
中的scaleCurrentDuration
- 参数:
scale
- The amount to scale the duration.- 另请参见:
- Animation.scaleCurrentDuration(float)
initialize
public void initialize(int width, int height, int parentWidth, int parentHeight)
- 从类
Animation
复制的描述 - Initialize this animation with the dimensions of the object being animated as well as the objects parents. (This is to support animation sizes being specifed relative to these dimensions.)
Objects 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).
- 覆盖:
- 类
Animation
中的initialize
- 参数:
width
- 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- 另请参见:
- Animation.initialize(int, int, int, int)
reset
public void reset()
- 从类
Animation
复制的描述 - Reset the initialization state of this animation.
- 覆盖:
- 类
Animation
中的reset
- 另请参见:
- Animation.initialize(int, int, int, int)
getAnimations
public List<Animation> getAnimations()
- 返回:
- All the child animations in this AnimationSet. Note that this may include other AnimationSets, which are not expanded.
willChangeTransformationMatrix
public boolean willChangeTransformationMatrix()
- 从类
Animation
复制的描述 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.
- 覆盖:
- 类
Animation
中的willChangeTransformationMatrix
- 返回:
- true if this animation will change the transformation matrix
willChangeBounds
public boolean willChangeBounds()
- 从类
Animation
复制的描述 Indicates whether or not this animation will affect the bounds of theanimated view. For instance, a fade animation will not affect the boundswhereas a 200% scale animation will.
- 覆盖:
- 类
Animation
中的willChangeBounds
- 返回:
- true if this animation will change the view's bounds
- AnimationSet
- AnimationSet
- AnimationSet
- AnimationSet
- android AnimationSet
- android animationset
- 动画。。AnimationSet
- AnimationSet & Animation
- Android中的AnimationSet使用
- android AnimationSet 使用
- AnimationSet类有用法
- Android中的AnimationSet使用
- android AnimationSet小结
- animationSet.setFillAfter方法无效
- android:interpolator animationSet属性
- Android中的AnimationSet使用
- Android中的AnimationSet使用
- Android之AnimationSet
- java基础篇--07<java异常处理>
- 关于ueditor报错问题
- 深度学习概述:从感知机到深度网络
- Java 三大特性 —— 多态
- VS2013的OSG开发环境配置
- AnimationSet
- AnimationUtils
- 机器学习算法汇总:人工神经网络、深度学习及其它
- Express + Node.js 实现拦截器
- 微信公众平台从入门到精通二
- iOS文件写入读取
- spring MVC配置详解
- ListView的使用
- 迭代----- Maximum Depth of Binary Tree