zoukankan      html  css  js  c++  java
  • 【Android】详解Android动画之Interpolator插入器

    Interpolator英文意思是: 篡改者; 分类机; 校对机

    SDK对Interpolator的描述是:An interpolator defines the rate of change of an animation. This allows the basic animation effects (alpha, scale, translate, rotate) to be accelerated, decelerated, repeated, etc。简而言之Interpolator就是一个“变化率”,一个基本动画的“变化率”。
    比如:从A到B的一个平移动画,移动,当然后速度的快慢,那么从A到B可以是匀速、匀加速、匀减速、变速完成这段距离。假设距离为S,时间为t,速度为v,都知道S=v*t。
    这个Interpolator在这里就是一个速度控制器,控制速度变化。先给一个对Interpolator的大概理解,接下来站在程序员的角度来认识Interpolator。
    Interpolator借口只有一个抽象方法getInterpolation(float input),

    由此SDK中扩展了另外几个常用Interpolator类,分别是:


    ——AccelerateInterpolator:动画从开始到结束,变化率是一个加速的过程。
    ——DecelerateInterpolator:动画从开始到结束,变化率是一个减速的过程。
    ——CycleInterpolator:动画从开始到结束,变化率是循环给定次数的正弦曲线。
    ——AccelerateDecelerateInterpolator:动画从开始到结束,变化率是先加速后减速的过程。
    ——LinearInterpolator:动画从开始到结束,变化率是线性变化。

  • 相关阅读:
    关于表单的jQuery练习
    jQuery中的综合动画
    jQuery中自定义简单动画的实现
    清除浮动
    定位
    盒子模型
    笔记
    笔记
    翻页
    DOM
  • 原文地址:https://www.cnblogs.com/rayray/p/3373691.html
Copyright © 2011-2022 走看看