Animations的使用(三)

来源:互联网 发布:沈阳网络营销黑马网络 编辑:程序博客网 时间:2024/05/18 21:51

Frame-to-Frame Animation 的用处之一:一个软件的背景需要随时间更换



设置interpolator的方法:

<set
xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:shareInterpolator="true">

在代码中:

AnimationSet animationSet=new AnimationSet(true);   //true表示共享同一个interpolator
animationSet.setInterpolator(new AccelerateDecelerateInterpolator());

原创粉丝点击