【问题标题】:android rotate clockwise over then rotate aniclockwise back on its own axisandroid顺时针旋转然后逆时针旋转回到它自己的轴上
【发布时间】:2014-12-09 07:51:32
【问题描述】:

如何将imageview顺时针旋转10度,

然后图像视图动画停止(在 10 度)重复旋转(逆时针)到 0 度?

我只知道如何旋转到 10 度,但我不知道如何返回到 0 度。

非常感谢。

imageview 0度→10度→0度(重复)

   RotateAnimation anim = new RotateAnimation(x, y, 10f, 10f);
    anim.setInterpolator(new LinearInterpolator());
    anim.setRepeatCount(Animation.INFINITE);
    anim.setDuration(700);
    imageView.startAnimation(anim);

【问题讨论】:

    标签: android animation rotation repeat


    【解决方案1】:

    你必须设置动画的重复模式。

    anim.setRepeatMode(Animation.REVERSE);
    

    【讨论】:

      猜你喜欢
      • 2011-07-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多