android之interpolator的用法詳解

android:interpolator

 

   Interpolator 被用來修飾動畫效果,定義動畫的變化率,可以使存在的動畫效果accelerated(加速),decelerated(減速),repeated(重複),bounced(彈跳)等。

  android中的文檔內容如下:

 

  AccelerateDecelerateInterpolator 在動畫開始與結束的地方速率改變比較慢,在中間的時候加速

     AccelerateInterpolator  在動畫開始的地方速率改變比較慢,然後開始加速

   AnticipateInterpolator 開始的時候向後然後向前甩

   AnticipateOvershootInterpolator 開始的時候向後然後向前甩一定值後返回最後的值

   BounceInterpolator   動畫結束的時候彈起

   CycleInterpolator 動畫循環播放特定的次數,速率改變沿着正弦曲線

   DecelerateInterpolator 在動畫開始的地方快然後慢

     LinearInterpolator   以常量速率改變

     OvershootInterpolator    向前甩一定值後再回到原來位置

如果android定義的interpolators不符合你的效果也可以自定義interpolators

 

原文來自:http://blog.csdn.net/jason0539

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