android RotateAnimation使用

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座標的伸縮值。 



例子:

RotateAnimation rotateAnimation = new RotateAnimation(0, (float)b - (float)lastBearing, RotateAnimation.RELATIVE_TO_SELF, 0.5f ,RotateAnimation.RELATIVE_TO_SELF, 0.5f);


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