Animations的使用(三)

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());

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章