Animation Set属性

来源:互联网 发布:淘宝app怎么看卖家信誉 编辑:程序博客网 时间:2024/06/08 00:48

android:detachWallpaper
Special option for window animations: if this window is on top of a wallpaper, don’t animate the wallpaper with it.
特殊的选项。如果动画的window在壁纸上面,如果设置成true,壁纸不会播放这个动画。动画只会应用给window,墙纸是静态不动的
想不到有什么使用场景,默认是false。
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.
如果设置成true或者 fillEnabled is false,动画的状态使用的是播放之前的状态

android:fillEnabled
When set to true, the value of fillBefore is taken into account.
默认值是false。如果是true,动画将会应用fillBefore值;否则,fillBefore的值会被忽略,transformation会在动画结束的时候被应用。
如果想让动画播放完成后停留在最后的状态,就设置fillAfter 为true,否则就不用设置,使用默认值即可。

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.
定义动画播放完成后的行为方式,repeatCount>0时有效,有两种状态,reverse和restart 翻转播放或者重新播放。

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.
运行Z轴上的状态