android tween 四种动画

一、AlphaAnimation

实现透明渐变效果

参数:float fromAlpha, float toAlpha

         fromAlpha:动画开始显示度,  toAlpha:动画结束显示度

 

二、RotateAnimation

实现图片旋转

参数:float fromDegrees, float toDegrees, int pivotXType, float pivotXValue, int pivotYType, float pivotYValue

       fromDegrees: 开始旋转偏离值  toDegrees:结束旋转偏离值 

       pivotXType:X方向旋转模式 pivotXValue, pivotYType,  pivotYValue

旋转模式有 四种: (Animation.ABSOLUTE, Animation.RELATIVE_TO_SELF, or Animation.RELATIVE_TO_PARENT), 

例子:(0f, -360f,
          Animation.RELATIVE_TO_SELF,0.5f,
          Animation.RELATIVE_TO_SELF, 0.5f
    );将以图片自身中心点为旋转轴点  按逆时针方向选转360度

三、TranslateAnimation

实现图片位置移动

参数:int fromXType, float fromXValue, int toXType, float toXValue, int fromYType, float fromYValue, int toYType, float toYValue

        fromXValue:开始X坐标值 toXValue:结束X坐标值

四、ScaleAnimation

实现图片大小变化

参数:(float fromX, float toX, float fromY, float toY, int pivotXType, float pivotXValue, int pivotYType, float pivotYValue)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值