017_RotateAnimation 翻译学习

本文详细介绍Android中的RotateAnimation类,包括其构造方法及如何通过不同参数设置实现旋转动画效果。介绍了如何指定旋转的角度范围以及旋转中心点的位置。

RotateAnimation

官方:http://developer.android.com/reference/android/view/animation/RotateAnimation.html

相关博客:http://blog.youkuaiyun.com/wf_zeng/article/details/9342623

类信息:public class RotateAnimation extends Animation

简介:用于控制旋转的动画对象。旋转动画在坐标轴中进行,可以指定旋转中心点,如果未制定,那么默认指定为View的(0,0)点,即视图左上角。

翻译:

公共方法:

1、  public RotateAnimation (Context context, AttributeSet attrs)

从资源文件中构造出RotateAnimation对象;

参数:context  应用上下文对象

2、  public RotateAnimation (float fromDegrees, float toDegrees)

构造RotateAnimation对象,并设定旋转角度的起始点fromDegrees与终点toDegrees。默认的旋转中心点(0,0);

3、  public RotateAnimation (float fromDegrees, float toDegrees, floatpivotX, float pivotY)

构造RotateAnimation对象,并设定旋转角度的起始点fromDegrees与终点toDegrees并设定旋转中心点(pivotX, pivotY);

4、  public RotateAnimation (float fromDegrees, float toDegrees, intpivotXType, float pivotXValue, int pivotYType, float pivotYValue)

构造RotateAnimation对象,并设定旋转角度的起始点fromDegrees与终点toDegrees并设定旋转中心点(pivotXValue, pivotYValue)。

pivotXType、pivotYType   指定pivotXValue、pivotYType如何进行插值。可以是Animation.ABSOLUTE, Animation.RELATIVE_TO_SELF, orAnimation.RELATIVE_TO_PARENT中的一个.

 

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值