Android Easing Interpolator——一些动画插值器

本文探讨了Android动画系统中的插值器Interpolator如何改变动画播放速率,特别是Easing Function的应用。通过分析Easing Function,如二次函数,解释了Interpolator如何将线性时间转换为非线性值,以实现不同动态效果。并提供了EaseAnimationInterpolator的示例代码。
摘要由CSDN通过智能技术生成

Android动画系统中提供插值器Interpolator来改变动画的播放速率,实现不同的动态效果。Android系统提供了一些插值器的实现,比如LinearInterpolator、AccelerateInterpolator等。

Easing Function是一些插值函数的实现,在这里可以看到http://easings.net/zh-cn,在这些函数的计算里参数包含了起始值和时间,我们知道Interpolator的作用是将当前的线性时间比值转换为非线性值或其他,来改变动画的播放速度,

/**
 * A time interpolator defines the rate of change of an animation. This allows animations
 * to have non-linear motion, such as acceleration and deceleration.
 */
public interface TimeInterpolator {

    /**
     * Maps a value representing the elapsed fraction of an animation to a value that represents
     * the interpolated fraction. This interpolated value is then multiplied by the change in
     * value of an animation to derive the 
  • 3
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值