android動畫

RotateAnimation (float fromDegrees, float toDegrees, int pivotXType, float pivotXValue, int pivotYType, float pivotYValue)


參數說明:

float fromDegrees:旋轉的開始角度。
float toDegrees:旋轉的結束角度。
int pivotXType:X軸的伸縮模式,可以取值爲ABSOLUTE、RELATIVE_TO_SELF、RELATIVE_TO_PARENT
float pivotXValue:X座標的伸縮值。
int pivotYType:Y軸的伸縮模式,可以取值爲ABSOLUTE、RELATIVE_TO_SELF、RELATIVE_TO_PARENT 

float pivotYValue:Y座標的伸縮值


 
TranslateAnimation(float fromXDelta, float toXDelta, float fromYDelta, float toYDelta)  

參數說明: 

float fromXDelta :動畫開始的點離當前View X座標上的差值
float toXDelta :動畫結束的點離當前View X座標上的差值
float fromYDelta: 動畫開始的點離當前View Y座標上的差值
float toYDelta :動畫開始的點離當前View Y座標上的差值 
 
ScaleAnimation(float fromX, float toX, float fromY, float toY,int pivotXType, float pivotXValue, int pivotYType, float pivotYValue)

參數說明: 
float fromX 動畫起始時 X座標上的伸縮尺寸
float toX 動畫結束時 X座標上的伸縮尺寸
float fromY 動畫起始時Y座標上的伸縮尺寸
float toY 動畫結束時Y座標上的伸縮尺寸
int pivotXType 動畫在X軸相對於物件位置類型
float pivotXValue 動畫相對於物件的X座標的開始位置
int pivotYType 動畫在Y軸相對於物件位置類型
float pivotYValue 動畫相對於物件的Y座標的開始位置 

AlphaAnimation(float fromAlpha, float toAlpha)
AlphaAnimation(0.01f, 1.0f); 從0.01f到1.0f漸變。0.0是完全透明,1.0完全不透明。



發佈了25 篇原創文章 · 獲贊 1 · 訪問量 4萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章