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万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章