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坐标的伸缩值。
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坐标的伸缩值。
相关文章推荐
- V4L2 API详解 <三> Buffer的准备和数据读取
- Android编程之横屏竖屏切换及状态保存
- rsync+inotify实时同步应用
- 黑马程序员_Java基础提高笔记1
- CBitmap位图类
- 黑马程序员_C语言基本运算和流程控制
- UIView的layoutSubviews和drawRect方法何时调用
- ffmpeg 中avio_alloc_context的使用
- Android ListView 去除边缘阴影、选中色、拖动背景色等
- 简单的单例实现
- 黑马程序员_C语言基本概念
- git 分支管理策略 与 物理实现 --author by阮一峰 & 小鱼
- 黑马程序员_C语言概述
- Linux基础学习(意义、文件系统)
- ecshop的小总结
- 都市感衣橱 权利套装单品举荐女程序猿你值得拥有
- ajax打开一个新页面
- 【黑马程序员】C语言学习笔记之结构体(十二)
- 常用代码片段集锦
- 低内存处理