您的位置:首页 > 其它

Animation动画类

2014-03-17 09:38 246 查看
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坐标的开始位置

//----------------------------------------------------------------------------------------------

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坐标上的差值

animation.setDuration(long durationMillis);//设置动画持续时间

animation.setRepeatCount(int i);//设置重复次数

animation.setRepeatMode(Animation.REVERSE);//设置反方向执行

//-----------------------------------------------------------------------------------------------

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坐标的伸缩值。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: