//设置动画为加速动画(动画播放中越来越快)
animation.setInterpolator(new AccelerateInterpolator());
//设置动画为减速动画(动画播放中越来越慢)
animation.setInterpolator(new DecelerateInterpolator());
//设置动画为先加速在减速(开始速度最快 逐渐减慢)
animation.setInterpolator(new AccelerateDecelerateInterpolator());
//先反向执行一段,然后再加速反向回来(相当于我们弹簧,先反向压缩一小段,然后在加速弹出)
animation.setInterpolator(new AnticipateInterpolator());
//同上先反向一段,然后加速反向回来,执行完毕自带回弹效果(更形象的弹簧效果)
animation.setInterpolator(new AnticipateOvershootInterpolator());
//执行完毕之后会回弹跳跃几段(相当于我们高空掉下一颗皮球,到地面是会跳动几下)
animation.setInterpolator(new BounceInterpolator());
//循环,动画循环一定次数,值的改变为一正弦函数:Math.sin(2* mCycles* Math.PI* input)
animation.setInterpolator(new CycleInterpolator(2));
//线性均匀改变
animation.setInterpolator(new LinearInterpolator());
//加速执行,结束之后回弹
animation.setInterpolator(new OvershootInterpolator());
安卓动画插值器学习笔记
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 1 插值器(Interpolator)简介 插值器(Interpolator)是设置动画运行过程中的变化规律,类似...
- 安卓动画分类 安卓动画分为图中所示4大类。所谓帧动画,即准备很多图片,让图片按一定时间连续播放,从而达到模拟动画效...
- 引言 众所周知,一款没有动画的 app,就像没有灵魂的肉体,给用户的体验性很差。现在的 android 在动画效果...