二、Animation动画插值器
来源:互联网 发布:雕刻机制图软件 编辑:程序博客网 时间:2024/06/08 10:54
Interpolator插值器
作用:控制动画执行过程中的速度:线性,正玄,正切,圆抛物线等,形成不同的动画效果),因此,插值器的本质就是一个动画执行速度控制器。
1、插值器各值的含义:
AccelerateDecelerateInterpolator:在动画开始与结束的地方速率改变比较慢,中间的时候加速AccelerateInterpolator:在动画开始的地方速率改变比较慢,然后开始加速AnticipateInterpolator:开始的时候向后,然后向前甩AnticipateOvershootInterpolator:开始的时候向后,然后向前甩一定值后返回最后的值BounceInterpolator:动画结束的时候弹起(像装水的气球会有弹性一样)CycleInterpolator:动画循环播放特定的次数,速率改变沿着正弦曲线DecelerateInterpolator:在动画开始的地方快然后慢LinearInterpolator:以常量速率改变OvershootInterpolator:向前甩一定值后,再回到原来位置
2、插值器各值的格式:
AccelerateDecelerateInterpolator:@android:anim/accelerate_decelerate_interpolatorAccelerateInterpolator:@android:anim/accelerate_interpolatorAnticipateInterpolator:@android:anim/anticipate_interpolatorBounceInterpolator:@android:anim/bounce_interpolatorCycleInterpolator:@android:anim/cycle_interpolatorDecelerateInterpolator:@android:anim/decelerate_interpolatorLinearInterpolator:@android:anim/linear_interpolatorOvershootInterpolator:@android:anim/overshoot_interpolator
3、插值器各值的用法:
Xm中的用法:
<rotate xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:fromDegrees="0"android:toDegrees="360"android:pivotX="50%" android:pivotY="50%" android:duration="700"android:fillAfter="true"/><alpha xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/linear_interpolator" android:fromAlpha="0.0"android:toAlpha="1.0" android:duration="3000" android:fillAfter="true"/>
Java代码中的用法:
AnimationSet mAnimationSet = new AnimationSet(true); mAnimationSet.setInterpolator(new DecelerateInterpolator());
阅读全文
0 0
- 二、Animation动画插值器
- Animation动画详解二
- 动画效果二 ----Frame Animation
- 二、属性动画(Property Animation)
- Android动画 -- Property Animation(二)
- 动画效果 --Animation 总汇(动画专题研究二)
- Android Animation 动画(二)--Drawable动画
- Animation动画(二)---- Frame 帧动画
- Animation动画详解(二)——Interpolator插值器
- Animation动画详解(二)——Interpolator插值器
- 插值器 animation动画
- android动画实现-Frame animation(二)
- Android属性动画---Property Animation(二)
- Android Tween Animation 动画(二)
- Android属性动画---Property Animation(二)
- Animation动画效果的实现(二)
- Android动画之Property Animation(二)
- Android动画之二:View Animation
- Angular学习(一)
- null 和 undefined 的区别
- 2、Spring-boot热部署
- elsaticsearch的安装
- Android studio Rendring Problems
- 二、Animation动画插值器
- week12-leetcode #347-Top-K-Frequent-Elements
- 如何编译安装Bundler
- java中equals和==的区别
- java synchronized关键字的用法
- 认知
- [10]_移植web服务器到ubuntu16.04.3
- route
- 在Windows10中安装Canopy无法启动的解决方法