Android动画----Interpolator(插入器)
来源:互联网 发布:http www.123js.cn 编辑:程序博客网 时间:2024/05/14 07:50
引言
Android的几种基础动画前面的几篇博客已经介绍的差不多了,在前几篇博客一直预留了一个问题就是Interpolator的说明,本篇博客就着重介绍一下Interpolator的含义
Interpolator的含义
Interpolator字典意思是插入器,在动画当中充当的角色就是动作,类似于我们做PPT时,为动画添加动作,Android系统也为动画提供了很多动作,Interpolator本身是个接口,Android提供了很多实现类,下面我们就看看这些实现类。
Interpolator的实现类
AccelerateDecelerateInterpolator
动作效果:An interpolator where the rate of change starts and ends slowly but accelerates through the middle.
译:动画的变化速率开始和结束时慢,中间时快。
AccelerateInterpolator
动作效果:An interpolator where the rate of change starts out slowly and and then accelerates.
译:开始时比较慢,并且慢慢加速。
AnticipateInterpolator
动作效果:An interpolator where the change starts backward then flings forward.
译:开始时向后甩然后向前滑到
AnticipateOvershootInterpolator
动作效果:An interpolator where the change starts backward then flings forward and overshoots the target value and finally goes back to the final value.
译:开始时向后甩然后向前超过终止时的值最后回退到终止的值。
BounceInterpolator
动作效果:An interpolator where the change bounces at the end.
译:在结束时反弹
CycleInterpolator
动作效果:Repeats the animation for a specified number of cycles. The rate of change follows a sinusoidal pattern.
译:动画重复特定的次数,变化速率以正弦曲线变化
DecelerateInterpolator
动作效果:An interpolator where the rate of change starts out quickly and and then decelerates.
译:以一个极快的速率开始慢慢减速
LinearInterpolator
动作效果:An interpolator where the rate of change is constant
译:匀速变化
OvershootInterpolator
动作效果:An interpolator where the change flings forward and overshoots the last value then comes back.
译:向前甩一定值后再回到原来位置
Interpolator的用法
xml用法:
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
代码用法:
mRotateAnimation.setInterpolator(this,android.R.anim.accelerate_interpolator);
结尾
Interpolator的就简单介绍这些,Interpolator也是可以支持自定义的,后面抽空再花时间研究一下。
- Android动画----Interpolator(插入器)
- Android 动画之Interpolator插入器
- 详解Android动画之Interpolator插入器
- 详解Android动画之Interpolator插入器
- 详解Android动画之Interpolator插入器
- Android 动画之Interpolator插入器
- 详解Android动画之Interpolator插入器
- Android 动画之Interpolator插入器
- Android动画之Interpolator插入器
- 【Android】详解Android动画之Interpolator插入器
- Android中的Interpolator插入器
- android动画(一)Interpolator
- android动画(一)Interpolator
- android动画(一)Interpolator
- android动画(一)Interpolator
- android动画(一)Interpolator
- android动画(一)Interpolator
- Android动画(一)Interpolator
- Gson Advanced — 自定义反序列化基础
- 2秒内按两下返回键退出程序
- android apk反编译(待整合)
- Gson Advanced — 自定义对象实例创建
- Duilib 使用的一些记录-01
- Android动画----Interpolator(插入器)
- 简单三层架构项目二
- wlan password
- Gson Advanced — 通过 @JsonAdapter 自定义(反)序列化过程
- FFmpeg纯净版解码 av_parser_parse2
- You Must Rebuild It With Bitcode Enabled (Xcode Setting ENABLE_BITCODE) 解决方案
- 64中常用十六进制颜色整
- 微信小程序获取当前日期
- 【Android源码-AMS】(五) TaskRecord